On Fri, 10 Jan 2003, Dave Rolsky wrote:
> Can we simply declare 0-based as the standard for day of week and day of
> year, and 1-based for day of month, month of year, and week of year.
> FWIW, that's what Date::ICal already had implemented, I believe.
> [ ... ]
> The fact that month returns a name while mon returns a number makes little
> sense to me.
>
> I propose the following:
>
> month - 1-12
> month_name - full name
> month_name_abbr - abbreviated name
> [ ... ]
I would like to see 1-based indexing tossed out competely. Not that it's
intuitive to use 0-indexed lists for things like dates -- it's not! But as
programmers we are used to 0-indexing and for the sake of consistency I
think we should takes this opportunity to make the date/time API conform
to the rest of computing.
I never understood why localtime returns a 0-indexed month but a 1-indexed
day of month ...
The other alternative would be to make everything 1-indexed, but that
would require remembering that DateTime differs from everything else you
use that produces a list.
- nick
~~~~~~~~~~~~~~~~~~~~
Nick Tonkin {|8^)>