In German speaking countries week # 1 is the week that contains January 4. (ISO 8601).

In the US week #1 is the week that contains January 1.

So the WeekOfYear is not a worldwide consistent value.

MacOS and Windows week calculations are based on the US system only.

Additionally, of course the week starts on Sunday in the US and on Monday in most European countries.

If you need to show a WeekOfYear, you need to do your own calculation.

Paul



I'm having trouble with the Date.WeekOfYear property.

For example, for the date 20 September 2006, the WeekOfYear returns 38.
And the date 24 September 2006 has a WeekOfYears of 39!?

Is it related to the fact that DayOfWeek returns 1 for sundays?
(in my location, the first day of the week is monday, so 24 September 2006 should be in the same week than 20 September)

I'm making calculations on WeekOfYears of 2 date objects. Should I simply substract 1 when the DayOfWeek is a sunday?

Also, why DayOfWeek starts at Sunday? Is Sunday the first day of the week somewhere? (just a question)

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to