On Sunday, January 12, 2003, at 10:48 AM, Rich Bowen wrote:
This is a classic localization problem, with the convention varying from one place and time to another.On Sun, 12 Jan 2003, John Peacock wrote:We really have to go with ISO because that battle has already been fought and won(?) in the international community.Well, I was going to say the following:
This is not about either ISO standard or backward compatibility with C, but about common usage. People think of Sunday as the first day, and so we should stick with that, so as not to confuse people.
However, based on your comment, I'm not sure if that is the case.
I've seen a number of indications that many, perhaps most, Europeans consider the week to start on Monday, and a quick Google search turned up more anecdotal support for this theory, ex: "Many British calendars and diaries use Monday as the start of the week; but some still use Sunday." (http://www.merlyn.demon.co.uk/weekinfo.htm)
Another source clarifies that starting on Sunday is in fact the original pattern, and that counting from Monday is a later development of European cultures, especially Protestant and German-speaking ones. (http://www.friesian.com/week.htm)
Personally, I've always preferred calendar weeks that start on Monday, partly for the onomatopoeia (mONEday, TWOsday, 3ednesday, FOURsday, FrIVEsday, ...), and partly because it synched up with the school-day/work-day cycle.
Synchronization to the work week is also useful in some kinds of business contexts -- if you're scheduling weekday shifts, it's more convenient for your work days to run from 1-5 than from 2-6 -- and I believe the ISO week-numbering work is based on existing practices in the manufacturing industry. Some desktop calendar software allows you to switch the display to Monday weeks, and many business-week planning calendars also start on Monday.
In a sense, one would like to be able to treat this as a locale issue, so that a user could specify the convention used in their setting, in the same way that they can select the language used. ("I'm in Germany, give me German day names and ISO weeks.")
A simpler solution would be to support multiple interfaces:
($year, $week_num, $week_day) = $dt->greg_week();
($year, $week_num, $week_day) = $dt->iso_week();
Callers could choose to request whichever number they wanted:
- $dt->iso_week_day - 1..7 starting with Monday
- $dt->iso_week_day_0 - 0..6 starting with Monday
- $dt->greg_week_day - 1..7 starting with Sunday
- $dt->greg_week_day_0 - 0..6 starting with Sunday
-Simon