Skip to content

Commit

Permalink
Calendar: Ceil the limit for the recurrent entries
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
raviks789 committed Oct 19, 2023
1 parent fd56f3c commit 2124dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Notifications/Widget/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2124dd3

Please sign in to comment.