Date: Fri, 12 Mar 1999 11:18:41 +0200 From: Ruslan Ermilov <ru@ucb.crimea.ua> To: Julian Elischer <julian@whistle.com> Cc: Florin Nicolescu <fnicoles@pcnet.pcnet.ro>, FreeBSD-hackers <freebsd-hackers@FreeBSD.ORG> Subject: Re: Y2K bug Message-ID: <19990312111841.A91406@relay.ucb.crimea.ua> In-Reply-To: <Pine.BSF.3.95.990312002949.3160A-100000@current1.whistle.com>; from Julian Elischer on Fri, Mar 12, 1999 at 12:35:57AM -0800 References: <199903120731.JAA11891@nick.ro> <Pine.BSF.3.95.990312002949.3160A-100000@current1.whistle.com>
index | next in thread | previous in thread | raw e-mail
Or, according to Kernighan & Ritchie's "The C Programming Language",
Second Edition:
if (Year % 4 == 0 && Year % 100 != 0 || Year % 400 == 0)
Feb = 29;
else
Feb = 28;
On Fri, Mar 12, 1999 at 12:35:57AM -0800, Julian Elischer wrote:
>
>
> no
>
>
> if ((Year % 4) == 0) {
> if ((Year % 100) == 0) {
> if (( Year % 400) == 0) {
> Feb = 29;
> } else {
> Feb = 28;
> }
> } else {
> Feb = 29;
> }
> } else {
> Feb = 28;
> }
>
>
>
> On Fri, 12 Mar 1999, Florin Nicolescu wrote:
>
> > Hi,
> >
> > 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).
> >
> > Ciao,
> > Nick
> >
> > --
> > ------------------------------------------------------------------
> > | Florin-Nicolae Nicolescu <fnicoles@pcnet.pcnet.ro> |
> > | University of Bucharest, Faculty of Mathematics |
> > | Bucharest,Romania |
> > ------------------------------------------------------------------
> > | Friends don't let friends use Windows. |
> > | Double your hard drive space instantly! Delete Windows! |
> > ------------------------------------------------------------------
> >
Cheers,
--
Ruslan Ermilov Sysadmin and DBA of the
ru@ucb.crimea.ua United Commercial Bank
+380.652.247.647 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990312111841.A91406>
