Leap Year

This is a sample form that allows a user to enter a text value that represents a year. The associated PHP application determines if the input year was/is/will be a leap year.

A leap year is defined as a year in the Gregorian calendar containing 366 days with February 29th as the extra day. Leap years are those years divisible by 4, except those years that complete centuries (that is, divisible by 100) which must be divisible by 400. Thus, 1998 was not a leap year, 1996 was, 2000 was, 1900 was not, 1600 was, 2100 will not be, 2028 will be, etc.

Enter the year

  

I heart Validator logo