diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2021-05-07 11:10:36 +0200 |
---|---|---|
committer | Carlos Garcia Campos <cgarcia@igalia.com> | 2021-05-07 11:10:36 +0200 |
commit | 1f8985e47623421fa563e5449671c18f186cbc3a (patch) | |
tree | e194dee4624255342f0945d6d3d5360935681c59 /gtk/gtkcalendar.c | |
parent | 59cc3a9f86eeeb91feb997af298dda79dd01eb37 (diff) | |
download | gtk+-1f8985e47623421fa563e5449671c18f186cbc3a.tar.gz |
calendar: value of day property is shifted by 1
The day is a number between 1 and 31 and that's what we get from
GDateTime.
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r-- | gtk/gtkcalendar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index ad7cbb1541..cda27021b8 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -1025,7 +1025,7 @@ gtk_calendar_set_property (GObject *object, case PROP_DAY: date = g_date_time_new_local (g_date_time_get_year (calendar->date), g_date_time_get_month (calendar->date), - g_value_get_int (value) + 1, + g_value_get_int (value), 0, 0, 0); if (date) { @@ -1065,7 +1065,7 @@ gtk_calendar_get_property (GObject *object, g_value_set_int (value, g_date_time_get_month (calendar->date) - 1); break; case PROP_DAY: - g_value_set_int (value, g_date_time_get_day_of_month (calendar->date) - 1); + g_value_set_int (value, g_date_time_get_day_of_month (calendar->date)); break; case PROP_SHOW_HEADING: g_value_set_boolean (value, gtk_calendar_get_show_heading (calendar)); |