mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-30 18:11:45 +00:00
Switch to 1M when it's MTD.
This commit is contained in:
@@ -206,7 +206,13 @@ class Navigation
|
||||
public function endOfPeriod(Carbon $end, string $repeatFreq): Carbon
|
||||
{
|
||||
$currentEnd = clone $end;
|
||||
|
||||
// Log::debug(sprintf('Now in endOfPeriod("%s", "%s").', $currentEnd->toIso8601String(), $repeatFreq));
|
||||
if('MTD' === $repeatFreq) {
|
||||
// fall back to a monthly schedule if the requested period is MTD.
|
||||
Log::debug('endOfPeriod() requests "MTD", set it to "1M" instead.');
|
||||
$repeatFreq = '1M';
|
||||
}
|
||||
|
||||
$functionMap = [
|
||||
'1D' => 'endOfDay',
|
||||
|
||||
Reference in New Issue
Block a user