On Sunday, January 12, 2003, at 02:25 PM, Dave Rolsky wrote:
On Sun, 12 Jan 2003, David Wheeler wrote:
My apologies for misunderstanding. What I meant was that, yes, the
1-starting month numbers are values, rather than array indices.
However, nowhere that I know if is there a situation in which month
numbers are returned 0-indexed, that is, as array indices.
You're wrong, you do know exactly such a situation. Perl's localtime
(which is based on C's localtime) returns exactly this (0-11). Days of
week are 0-6 (Sun-Sat), and day of year is 0-364.
Oops, typo. I meant month day numbers. They're always 1-(30|31|28|29),
never 0-(29|30|27|28).
Let's end this particular discussion (0-based vs. 1-based). I'm happy
with the 1-based API as default, with *_0 methods for when that is
needed.
This is a _very_ easy rule to remember, so people should not have to
constantly refer to the docs constantly (like I do every damn time I
use
localtime ;).
Agreed, we're on the same page here, Dave.
David
--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: [EMAIL PROTECTED]