Red Hat Bugzilla – Bug 201510
GtkCalendar starts on Saturday in POSIX
Last modified: 2007-11-30 17:11:39 EST
Description of problem:
In POSIX locale GtkCalendar starts weeks with Saturday.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create calendar.c:
GtkWidget *window, *w;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
w = gtk_calendar_new();
2. Compile it
gcc $(pkg-config --cflags --libs gtk+-2.0) -o calendar calendar.c
3. Run it
It shows a calendar with Saturday as the first day of the week.
I'm not sure if POSIX says anything about the first day of the week, anyway
Saturday is eccentric, so probably Sunday.
The calculation in gtk_calendar_init() for POSIX goes:
first_weekday = 7
week_origin = 19971130
week_1stday = 0
priv->week_start = 6
I don't understand why priv->week_start is computed as it's computed I can't
tell anything more.
This is a bug in the glibc localedata, see