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:
@@ -1681,7 +1681,7 @@ gcal_week_header_add_event (GcalWeekHeader *self,
|
|||||||
start = 0;
|
start = 0;
|
||||||
|
|
||||||
/* End position */
|
/* 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;
|
end = floor (g_date_time_difference (event_end, week_start) / G_TIME_SPAN_DAY) - all_day;
|
||||||
else
|
else
|
||||||
end = 6;
|
end = 6;
|
||||||
|
|||||||
Reference in New Issue
Block a user