In order to apply the doomsday algorithm accurately, you also need to quickly determine whether a year is a leap year or not. And to do so, you will need to memorise the following rules:
Odd years are never leap years.
Years divisible by 4 are usually leap years. When the year is the first year of a century (e.g. 1900), you must also consider the next rule.
Years divisible by 100 are not leap years unless they are also divisible by 400.
By following this diagram you can determine whether any year is a leap year or not.
Divisible by 4?
Yes
Divisible by 100?
Yes
Divisible by 400?
No
Not a leap year
No
Is a leap year
No
Not a leap year
Yes
Is a leap year
Here are some example years:
2023
Not leap year
Odd years are never leap years
1994
Not leap year
Not divisible by 4
2024
Leap year
Divisible by 4, does not end with -00
1900
Not leap year
Is divisible by 100
2000
Leap year
Is divisible by 100, but is also divisible by 400.