How it is calculated
A year is a leap year when it is divisible by 4. If it is also divisible by 100, it is not a leap year, unless it is divisible by 400. That is the Gregorian calendar.
Leap year = divisible by 4 and not by 100, or divisible by 400
Where the numbers come from
- Year
Example
2024 is divisible by 4 and not by 100, so it has 366 days. 1900 is divisible by 100 but not by 400, so it has 365.
Questions
Will 2100 be a leap year?
No. It is divisible by 100 and not by 400.
Does it work for old dates?
The rule is the Gregorian one. Countries adopted it in different years. For dates before the change, check the local calendar.
Why is this next to days between dates?
So you can check the year on its own, without setting 29 February by hand.