mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
fix Navigation.php MTD logic to make tests pass.
This commit is contained in:
parent
b8e18f80f4
commit
63012f269c
@ -283,14 +283,11 @@ class Navigation
|
|||||||
return $currentEnd;
|
return $currentEnd;
|
||||||
}
|
}
|
||||||
if ('MTD' === $repeatFreq) {
|
if ('MTD' === $repeatFreq) {
|
||||||
$today = today();
|
return $end->startOfMonth()->startOfDay();
|
||||||
if ($today->isSameMonth($end)) {
|
|
||||||
return $today->endOfDay();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $end->endOfMonth();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$result = match ($repeatFreq) {
|
$result = match ($repeatFreq) {
|
||||||
'last7' => $currentEnd->addDays(7)->startOfDay(),
|
'last7' => $currentEnd->addDays(7)->startOfDay(),
|
||||||
'last30' => $currentEnd->addDays(30)->startOfDay(),
|
'last30' => $currentEnd->addDays(30)->startOfDay(),
|
||||||
|
Loading…
Reference in New Issue
Block a user