Re: Year 2000 is NOT a leap year
Posted in 1997
Topics: General Discussion
In less mathematical terms: The change from the Julian calendar to the Gregorian involved the change of the simple rule for leap-years to the more complex one in which century years should only be leap-years if they were divisible by 400. For example, 1700, 1800 and 1900 are not leap-years whereas 2000 will be. Greg To: informix-list @ rmy.emory.edu, lpm008 @ email.mot.com cc: (bcc: Greg Salmon) Subject: Re: Year 2000 is NOT a leap year >From: Moffat <lpm008@email.mot.com> >Date: Tue, 08 Jul 1997 16:08:24 -0400 >X-Informix-List-Id: <news.40205> > >This is to the person who has an informix 2 legacy system. > The year 2000 is not a leap year. This is to the person who thinks that the year 2000 is not a leap year. ****************** ** Think Again! ** ****************** if (year % 400 == 0) leap_year = true; else if (year % 100 == 0) leap_year = false; else if (year % 4 == 0) leap_year = true; else leap_year = false; Just in case there's any doubt, the '%' represents the modulo operator of C/C++ and returns the integer remainder when the integer left operand is divided by the integer right operand. You need to take a remedial course in 'The Year 2000 -- Issues for Computer Professionals'. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> PS: I decline to respond to messages with anti-spam in the return path.