From 52164689d4eb7655fdeed87caf257678ab4e90c9 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 26 Nov 2025 19:05:46 +0100 Subject: [PATCH] Switch to 1M when it's MTD. --- app/Support/Navigation.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 585ba925b8..ed71714888 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -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',