Re: [svlug] February 30th 2000
H. Peter Anvin (hpa@transmeta.com)
12 Jan 2000 23:14:57 -0800
Followup to: <200001130058.TAA20390@kf8nh.apk.net>
By author: "Brandon S. Allbery KF8NH" <allbery@kf8nh.apk.net>
In newsgroup: linux.dev.kernel
>
> In message <LEBBJAINJCFIPFLCBCJCKEJCCFAA.lafraia@iron.com.br>, "Daniel
> Lafraia"
> writes:
> +-----
> | > Wrong. There is no February 30th ever. See
> | > http://www.nist.gov/y2k/faq.htm
> |
> | Sorry, Feb 30th doesn't exist for a quite a few hundred years. The problem
> +--->8
>
> It doesn't exist. Period.
>
> | February has 29 days when "year % 4 = 0", except when "year % 100 = 0" and
> | NOT when "year % 400 = 0".
> +--->8
>
> ...in which case February ends on the 28th as usual. What is so difficult
> to understand about "not a leap year"?
>
2000 is a leap year. The rule above is wrong. The rule is:
leap = (year % 4) 400) == 0 || ((year % 4) == 0 && (year % 100) != 0);
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/