Skip to content

Commit

Permalink
fix calculation of whether date is within boundary of school term
Browse files Browse the repository at this point in the history
  • Loading branch information
fredbradley committed Jan 7, 2025
1 parent 24075bd commit 8acc86b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/SchoolTermsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function isDateInTermTime(CarbonInterface $date): bool
$whittledDownList = $list->where('schoolYear', '>=', $lastYear); // purpose here is to limit the foreach loop

foreach ($whittledDownList as $term) {
if ($date > $term->startDate && $date < $term->finishDate->addDay()) {
if ($date >= $term->startDate && $date < $term->finishDate->addDay()) {
return true;
}
}
Expand Down

0 comments on commit 8acc86b

Please sign in to comment.