On Fri, 24 Jan 2003, Peter J. Acklam wrote:

> [EMAIL PROTECTED] (Dave Rolsky) wrote:
>
> > Ok, having accepted the fact that day of week numbering will be
> > 1-7, now we get to argue about which day is #1.
> >
> > Time::Piece (interface by Larry Wall) says Sunday, as does
> > localtime, which comes from C's localtime function
> >
> > Date::Calc says Monday, and refers us to ISO 8601, which does
> > indeed say day #1 is Monday.
> >
> > I'm inclined to go with ISO rather than backwards compatibility
> > with C.
>
> I believe this thread proves that what is considered the first day
> of the week must be customizable.  If it isn't, then someone
> (perhaps not someone on this mailing list, but someone) will be
> dissatisfied and consider the "DateTime" modules useless and write
> their own modules -- and much of the point with the "DateTime"
> modules will be lost.
>
> In relation to week numbers and day of week numbers, there are
> at least four parameters that must be customizable:
>
>    1) What is the first day of a week (Sunday, Monday, ...)?
>    2) What is the number of this day (0, 1)?
>    3) How many days of a week must be in the new year before
>       the week is considered the first week in the new year?
>       (ISO: 4, US: 1 and 7)
>    4) What is the number of this week (0, 1)?
>
> As for the default behaviour, I think ISO is the best thing, since
> it aims at being a world-wide standard.

Sure, but customizable at what level? Having an API that behaves
differently in different installations is a BAD thing. The foo_0
methods, I think, already address this matter.

-- 
And everyone said, "If we only live,
We too will go to sea in a Sieve -
To the hills of the Chankly Bore!"
 (The Jumblies, by Edward Lear)

Reply via email to