CalculatorsLesson 171Free preview
Leap Year Checker
This lesson is part of Web Developer Tools · All levels
Summary
The Leap Year Checker determines whether a leap year is a leap year, which is a year with 366 days and the date is February 29. The rule is divide by 4, except for the year of the century which is only squared when divided by 400. By this rule, 2024 is a comet, 1900 is not a comet, and 2000 is a comet.
Key points
- The year of the equinox divided by four
- The year of the century divided by 100 is not a period.
- Exceptions: years divided by 400 are fixed orbits
- 2024 and 2000 orbits, whereas 1900 is not
- The effect is that February has 29 days.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.