Le 20 sept. 06 à 02:20 Matin, Roger Clary a écrit:

On Sep 19, 2006, at 7:13 PM, Arnaud Nicolet wrote:

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

The expected result in the US

And the unexpected result elsewhere.

Is it related to the fact that DayOfWeek returns 1 for sundays?

Yes

Ok, seems logical.

(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?

Sure

Well, and also add one when the starting date is also a sunday. But it's a good starting point.

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

Yep. Here in good ol' USA

Well, so MacOS makes localizations and all that but fails on WeekOfYear for anywhere on the world except in north America?!
That's a shame.

Anyway, thank you for your answers
(you're not in fault)._______________________________________________
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