[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.

Peter

-- 
I wish dialog boxes had a butten saying "Whatever".  I hate being
forced to answer "Yes" or "No" to a question I have no opinion on
whatsoever.  There ought to be a button matching my indifference.

Reply via email to