week-header: Use g_date_time_compare()
It is incorrect to use the date-only comparison here. Use the appropriate GDateTime API and fix a truckload of issues. Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/546
This commit is contained in:
@@ -1775,7 +1775,7 @@ gcal_week_header_add_event (GcalWeekHeader *self,
|
||||
}
|
||||
|
||||
/* Start position */
|
||||
if (gcal_date_time_compare_date (event_start, week_start) >= 0)
|
||||
if (g_date_time_compare (event_start, week_start) >= 0)
|
||||
start = floor (g_date_time_difference (event_start, week_start) / G_TIME_SPAN_DAY);
|
||||
else
|
||||
start = 0;
|
||||
|
||||
Reference in New Issue
Block a user