mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-01 02:21: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
|
public function endOfPeriod(Carbon $end, string $repeatFreq): Carbon
|
||||||
{
|
{
|
||||||
$currentEnd = clone $end;
|
$currentEnd = clone $end;
|
||||||
|
|
||||||
// Log::debug(sprintf('Now in endOfPeriod("%s", "%s").', $currentEnd->toIso8601String(), $repeatFreq));
|
// 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 = [
|
$functionMap = [
|
||||||
'1D' => 'endOfDay',
|
'1D' => 'endOfDay',
|
||||||
|
|||||||
Reference in New Issue
Block a user