HP3000-L Archives

November 1997, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Tue, 11 Nov 1997 11:40:05 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
Jim Phillips writes:

> I thought I had this year 2000 stuff down.  But now I get a letter
>  from one of our customers that really confused me.  My understanding
>  of the leap year algorithm is:
>
>  A year is a leap year if it is evenly divisible by 4, except for
>  those years that are evenly divisible by 400.
>
>  Is this correct?  Or am I (as usual) deluded?  Is the year 2000
>  a leap year or not?

The problem lies not in ourselves, dear friends, but in our algorithms. The
leap year algorithm, as explained by your correspondent, is in error. The
correct algorithm is:

A year is a leap year if it is evenly divisible by 4, except for those years
that are evenly divisible by 100, except for those years that are evenly
divisible by 400.

Thus the year 2000 is indeed a leap year.

Wirt Atmar

ATOM RSS1 RSS2