From 6b4d08bfdba68e84bf1f7b0efeb7e73c2e6e4098 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Tue, 10 Oct 2023 17:05:38 +0200 Subject: [PATCH] `Calendar`: Ceil the limit for the recurrent entries For example an entry that runs over 48 hours, starts at monday at midnight and is repeated every 2 days. Requires to ceil the limit to show the last entry in the week view that goes into the next week. --- library/Notifications/Widget/Calendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Notifications/Widget/Calendar.php b/library/Notifications/Widget/Calendar.php index 0e1a52286..5a6783546 100644 --- a/library/Notifications/Widget/Calendar.php +++ b/library/Notifications/Widget/Calendar.php @@ -152,7 +152,7 @@ public function getEntries(): Traversable $length = $start->diff($end); $visibleHours = Util::diffHours($start, $grid->getGridEnd()); - $limit = (int) floor($visibleHours / (Util::diffHours($start, $end) ?: 0.5)); + $limit = (int) ceil($visibleHours / (Util::diffHours($start, $end) ?: 0.5)); if ($limit > $visibleHours) { $limit = $visibleHours; }