Originally posted by adeel ansari: you can just get the year and divide it by 4. if you get the reminder it means the year is not a leap year, else it is.
Works fine if you are using a Julian calendar, but not with a Gregorian calendar (one which is widely used) For example the year 1900 is divisible by 4, but is not a leap year, if you are following the Gregorian calendar.
There should be an additional check there If the year is divisible by 100, it should also be divisible by 400. If it doesn't, then it is not a leap year
Joined: Aug 15, 2004
Sorry folks I dont know about this. it is ridiculus. i was sleeping some where out of this world. [ September 22, 2004: Message edited by: adeel ansari ]