From owner-freebsd-hackers Fri Mar 12 1:23:26 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [212.110.138.1]) by hub.freebsd.org (Postfix) with ESMTP id C4EAE14BCD for ; Fri, 12 Mar 1999 01:22:34 -0800 (PST) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.2/8.9.2/UCB) id LAA94258; Fri, 12 Mar 1999 11:18:41 +0200 (EET) (envelope-from ru) Date: Fri, 12 Mar 1999 11:18:41 +0200 From: Ruslan Ermilov To: Julian Elischer Cc: Florin Nicolescu , FreeBSD-hackers Subject: Re: Y2K bug Message-ID: <19990312111841.A91406@relay.ucb.crimea.ua> Mail-Followup-To: Julian Elischer , Florin Nicolescu , FreeBSD-hackers References: <199903120731.JAA11891@nick.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Julian Elischer on Fri, Mar 12, 1999 at 12:35:57AM -0800 X-Operating-System: FreeBSD 3.1-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 | > > | 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