Date: Fri, 12 Mar 1999 00:51:35 -0700 From: Warner Losh <imp@harmony.village.org> To: Florin Nicolescu <fnicoles@pcnet.pcnet.ro> Cc: freebsd-hackers@FreeBSD.ORG (FreeBSD-hackers) Subject: Re: Y2K bug Message-ID: <199903120751.AAA16925@harmony.village.org> In-Reply-To: Your message of "Fri, 12 Mar 1999 09:31:13 %2B0200." <199903120731.JAA11891@nick.ro> References: <199903120731.JAA11891@nick.ro>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199903120731.JAA11891@nick.ro> Florin Nicolescu writes: : According to the discontinuities in the earth move around the sun, : once a four years there is inserted an extra day (29 of February), : but once a 400 years (when the first 2 digits of the year divide by : 4) it is not added. This is the case for 2000 (20 mod 4 = 0). When I : inserted the date 29 of February 2000 in FreeBSD, it has accepted it : OK, meaning that it believes that 2000 has the date 29 of Feb. I : don't know about other systems, but I know that a lot of people : ignore this rule (I've just looked into my agenda, and it has the : same error). Feb 29, 2000 is a leap year. Your leap year rule is wrong. The correct rule is as follows if (year is divisible by 4) -> leap year unless also divisible by 100 -> not a leap year (eg 1900) unless also divisible by 400 -> leap year (eg 2000) FreeBSD (and most systems) handles this correctly. It is not a bug. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903120751.AAA16925>