Make sure to add 1 when using closestIndex to find the current week of the month
[SonOfLokstallBot.git] / src / unfinished.php
index d8e58c9..de7b5b8 100644 (file)
@@ -15,7 +15,7 @@ $currentMonth = (int)(new DateTimeImmutable())->format('n');
 $currentDayOfMonth = closest((new DateTimeImmutable())->format('d'), $mondays);
 $currentSeason = getSeason($currentMonth);
 $currentYear = (int)(new DateTimeImmutable())->format('Y');
-$currentWeekOfMonth = closestIndex($currentDayOfMonth, $mondays);
+$currentWeekOfMonth = closestIndex($currentDayOfMonth, $mondays) + 1;
 
 $extractTasks = function($tasks, $path) {
     return array_merge($tasks, file_exists($path) ? lines(trim(file_get_contents($path))) : []);