1997-07-29 - NOISE: Leap years (was Re: y2k problem serious)

Header Data

From: Jeff Barber <jeffb@issl.atl.hp.com>
To: sunder@brainlink.com
Message Hash: 89f16c0d51543b5d8d0fb5da67862fa1bef27c13ebc8be8fbac68a781978fc52
Message ID: <199707291622.MAA03401@jafar.issl.atl.hp.com>
Reply To: <Pine.SUN.3.96.970729103454.11487B-100000@beast.brainlink.com>
UTC Datetime: 1997-07-29 16:37:12 UTC
Raw Date: Wed, 30 Jul 1997 00:37:12 +0800

Raw message

From: Jeff Barber <jeffb@issl.atl.hp.com>
Date: Wed, 30 Jul 1997 00:37:12 +0800
To: sunder@brainlink.com
Subject: NOISE: Leap years (was Re: y2k problem *serious*)
In-Reply-To: <Pine.SUN.3.96.970729103454.11487B-100000@beast.brainlink.com>
Message-ID: <199707291622.MAA03401@jafar.issl.atl.hp.com>
MIME-Version: 1.0
Content-Type: text/plain



Ray Arachelian writes:

>             Also, the year 2000 isn't a leap year, but most
> PC's will think it is.

This is wrong.  2000 *is* a leap year.

A leap year is a year that is evenly divisible by four but not by
100 unless also divisible by 400.

For example, 1900, 2100 and 2200 aren't leap years, but 1600, 2000,
and 2400 are.

In C coder lingo:

Boolean
IsLeapYear(long year)
{
    if ((year % 4) == 0) {
	if ((year % 100) == 0) {
	    if ((year % 400) == 0)
		return True;
	    return False;
	}
	return True;
    }
    return False;
}


-- Jeff






Thread