Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

leap year validation

Status
Not open for further replies.

jimlee

Programmer
Jan 27, 2001
213
GB
could soomeone please post me the code for the validaton check for a leap year in a date validation.

thanks in advance

jamie jimlee
 
for every year, just divide by 4, and if the result has no remainder then it is a leap year. unless it is a centenary year in which case it must be divisble by 400 with no remainder. e.g. 2000, 1600, 1200 etc.
 
thanks for all your help, i have everything i need now

cheers jimlee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top