[Coco] Julian Date

Gene Heskett gheskett at shentel.net
Sun May 21 01:26:46 EDT 2017


On Saturday 20 May 2017 23:48:59 William Astle wrote:

> On 2017-05-20 05:10 PM, Gene Heskett wrote:
> > Basically if the year is divisible by 4 its a leap year UNLESS the
> > date is divisible by 400 without a remainder, then it is not a leap
> > year. 2000 was not a leap year. 2400 will not be a leap year.  The C
> > manual uses the mod(year,4) or mod(year,400) to determine this IIRC.
>
> Lest this leave people with an inaccurate understanding of the
> Gregorian calendar, I think I should mention that Gene doesn't quite
> have this right.
>
> The actual rule is: A year is a leap year if it is divisible by 4 but
> is not divisible by 100. Additionally, if the year is divisible by
> 400, it is a leap year.
>
> Note that 2000 *was* a leap year. 1900 wasn't and 2100 will not be but
> 2400 will be.

Ya caught me out on that one, William. I don't even have to pull one of 
my copies of K&R (I have both) down to double check.  Can I blame it on 
oldtimers? At 82, the wet ram I am finding is not quite as photographic 
as it once was.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>


More information about the Coco mailing list