On 2011 Jun 15, at 2:16 PM, Fred Cisin wrote:
On Wed, 15 Jun 2011, Brent Hilpert wrote:
He didn't even make it to his 20th birthday,
no?
As you might have guessed, I was too lazy to look it up
.. and I was too lazy to do the calculations of your other questions.
A3: Century
years are not leap years even though divisible by 4,
unless
divisible by 400 (..the arcane things one remembers).
As a "Computer Math" problem, I gave different levels of credit for the
answers on whether they took 1900 into account, and whether they took
2000
into account.
I'm not sure, but I assume that 1900 leap-year exception was why some
Apple time/date data structures start counting in 1904.
.. ok for another 89 years then.
I remember learning about this ca. 1982 when I was revising some code.
There we go:
int
t_isleap( year )
int year;
{
return( year%4==0 && (year%100!=0 || year%400==0) );
}