utils: Align GcalWeekDay enum with ISO 8601
Start the enum from Monday-Sunday (1-7). Adapt code that references the `is_workday()` utility method, which in turn uses the GcalWeekDay enum to combine pairs of days by bitwise or-ing. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
This commit is contained in:
@@ -199,7 +199,7 @@ gcal_date_chooser_day_set_date (GcalDateChooserDay *self,
|
||||
|
||||
now = g_date_time_new_now (g_date_time_get_timezone (date));
|
||||
today = gcal_date_time_compare_date (date, now) == 0;
|
||||
weekday = g_date_time_get_day_of_week (date) % GCAL_N_WEEKDAYS;
|
||||
weekday = g_date_time_get_day_of_week (date);
|
||||
|
||||
if (G_UNLIKELY (today))
|
||||
gtk_widget_add_css_class (widget, "today");
|
||||
|
||||
Reference in New Issue
Block a user