View Single Post
Old 09-28-2005, 02:34 AM   #2 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
I think it would be easiest if you just wnet through each year with a for loop and evaluated it according to the predicates for a leap year.
-a year divisible by 4 is a leap year
-a year divisible by 100 is not a leap year
-a year divisble by 1000 is a leap year
-anything else is not a leap year
So 1996, 2000, and 2004 are but 2100 is not
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote