> C is, at times, less than logical. Witness the localtime fun: some of it's
> zero-based, some of it's one-based, and some of it's -1900-based. All from the
> same function. The localtime concept is needed, the localtime brain damage is
> really not.
I agree completely. I take issue with changing localtime(), though,
because
1. *Many* Perl scripts already use it
2. *Many* C programmers are familiar with its stupidity
If we want to "fix" it, why not offer up something like this?
1. Deprecate the current localtime() with a warning
2. Make a new, better date() function that returns
the "correct" args in what we feel to be the "correct"
format
This has two key advantages:
1. Existing programs don't break
2. Existing programmers won't say "Oh, localtime()! I
know how that works!"
An existing Perl 5 script:
my $date = localtime();
Could generate something like
"Function localtime() deprecated - use date() instead"
And then we could make date() return the year + 1900, months starting
with 1, etc, etc.
-Nate