];
$currentMonth = (int)(new DateTimeImmutable())->format('m');
$currentDayOfMonth = closest((new DateTimeImmutable())->format('d'), $mondays);
-$currentWeekOfMonth = array_search($currentDayOfMonth, $mondays);
+$currentWeekOfMonth = closestIndex($currentDayOfMonth, $mondays);
$taskLists = array_merge(
isStartOfSeason($currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)(getTasksForTheSeason(getSeason($currentMonth), $taskMatrix)))] : [],
},
// Magic. startOfSeason implies startofMonth so we get 2, start of month without start of season gives 1 and
// a regular week (not the start of a season or month) gives 0. And this is how the indicies are ordered in the array.
- $taskMessages[isStartOfSeason($currentMonth, $currentDayOfMonth) + isStartOfMonth($currentDayOfMonth)],
+ $taskMessages[(int)isStartOfSeason($currentMonth, $currentDayOfMonth) + (int)isStartOfMonth($currentDayOfMonth)],
$taskLists
);