week-header: Fix end of week comparison

This fixes comparison of an event to the end of the week, so "end" can't
incorrectly be 7 anymore.

Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/835

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/672>
This commit is contained in:
Adrien Plazas
2025-12-03 20:50:15 +01:00
parent c6849e405c
commit 9c1a7fecfc
+1 -1
View File
@@ -1681,7 +1681,7 @@ gcal_week_header_add_event (GcalWeekHeader *self,
start = 0;
/* End position */
if (g_date_time_compare (event_end, week_end) <= 0)
if (g_date_time_compare (event_end, week_end) < 0)
end = floor (g_date_time_difference (event_end, week_start) / G_TIME_SPAN_DAY) - all_day;
else
end = 6;