You are not logged in.

#1 2009-05-09 16:56:01

winch
Member
Registered: 2008-04-13
Posts: 43

Problems with en_GB locale, Tuesday is first day of week not Sunday.

I'm using the en_GB.UTF-8 locale which as far as I can tell says the first day of the week is Tuesday. As a result the orage calender in xfce shows weeks starting on Tuesday and ending on Monday which is pretty annoying.

Apparently orage uses the GTK calender widget. The following blog post describes the method used to get the first day of the week.
http://blogs.gnome.org/patrys/2008/09/2 … y-of-week/

* Run locale first_weekday week-1stday
* Parse week-1stday as date with %Y%m%d
* Move the result first_weekday - 1 days forward
* Check the weekday of the result

$ LANG=en_GB locale first_weekday week-1stday
2
19971201

1997-12-01 was a Monday. so Monday + (first_weekday - 1) = Tuesday.

$ LANG=C locale first_weekday week-1stday
7
19971201

1997-12-01 was a Monday. so Monday + (first_weekday - 1) = Sunday.

$ LANG=en_US locale first_weekday week-1stday
1
19971130

1997-11-30 was a Sunday. so Sunday + (first_weekday - 1) = Sunday.

The results are the same as what I see when I run orage. Is anybody else using en_GB locale with the same problem?

Last edited by winch (2009-05-09 16:57:34)

Offline

#2 2009-05-09 22:34:13

alex_anthony
Member
From: UK
Registered: 2007-09-25
Posts: 344

Re: Problems with en_GB locale, Tuesday is first day of week not Sunday.

Wow, just noticed that. Not sure if it's always been like that.

Offline

#3 2009-05-10 14:45:15

winch
Member
Registered: 2008-04-13
Posts: 43

Re: Problems with en_GB locale, Tuesday is first day of week not Sunday.

Offline

Board footer

Powered by FluxBB