According to Doug:
> [EMAIL PROTECTED] wrote:
> >      * Fixed problems in the date-parsing code that made it Y2K
> >        incompatible. In particular, it forgot that 2000 is a leap year
> >        and wouldn't correctly parse dates after 29 Feb 2000.
> 
>       Well, if it's any consolation to you, you're in very good company. I
> have it on very reliable authority (although I haven't tested it
> personally) that Windows NT5 prior to service pack 4 didn't know that
> the year 2000 is a leap year either. :)

The frustrating thing is the function had the right logic for determining
if a year is a leap year, but the author failed to take into account that
in a tm structure, the tm_year field contains the current year - 1900,
which threw the calculation off.  The code also included a little test
program, with lots of test cases, but not one of these went beyond 1997.
Grrr.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to