Here's a probably faster/easier way for most people to compute the Doomsday for a given year.
The Doomsday is the sum of a factor determined by the century part of the year and a factor determined by year within the century.
The century factor is:
Century Factor
20xx 2
21xx 0
22xx 5
23xx 3
This pattern repeats every 4 centuries indefinitely forward, and however far back you can go in your jurisdiction before you hit whatever calendar that was used there before the Gregorian calendar. (If you want a formula for this, it is 2 + (C % 4) x 5, where C is the first two digits of the year, but since there are only 4 items in the pattern, and most people will actually only care about one or two centuries, I'd just memorize the relevant factors).
For the factor determined by the year within the century, let T be the tens digit of that year and U the ones digit.
If T is even, the factor is:
2 x T + U + LE(U)
I'll cover LE below.
If T is odd, the factor is:
2 x T + 3 + U + LO(U)
LO() and LE() are corrections to take into account leap years in years where U != 0. Leap years when U = 0 are already accounted for in the 2 x T. Here are LE() and LO().
LE(U) = 0 if U < 4
LE(U) = 1 if 4 <= U < 8
LE(U) = 2 if 8 <= U
LO(U) = 0 if U < 2
LO(U) = 1 if 2 <= U < 6
LO(U) = 2 if 6 <= U
Or in English, in even decades add 1 if U >= 4, and add another 1 if U >= 8. In odd decades, add 1 if U >= 2, and another 1 if U >= 6.
Example: 2020. Century 20 factor = 2, T=2, U=0. T is even. Doomsday is 2 + 2 x 2 + 0 + 0 = 6 (Saturday).
Here are the years used for some of the examples in the link you gave.
2019. T=1, U=9. We've got an odd T, and a leap year correction of 2. Century is still 20. That gives us 2 + 2 x 1 + 3 + 2 + 2 = 4 (Thursday). I've taken the liberty of reducing mod 7 along the way, so used 2 instead of 9 when adding in U. Note that when figuring the leap year factor you have to use the actual U, not U mod 7.
2018. 2 + 2 + 3 + 1 + 2 = 3 (Wednesday).
2017. 2 + 2 + 3 + 0 + 2 = 2 (Tuesday).
2069. 2 + 2 x 6 + 2 + 2 = 4 (Thursday).
1929. 3 for 19xx. 3 + 2 x 2 + 2 + 2 = 4 (Thursday).
The Doomsday is the sum of a factor determined by the century part of the year and a factor determined by year within the century.
The century factor is:
This pattern repeats every 4 centuries indefinitely forward, and however far back you can go in your jurisdiction before you hit whatever calendar that was used there before the Gregorian calendar. (If you want a formula for this, it is 2 + (C % 4) x 5, where C is the first two digits of the year, but since there are only 4 items in the pattern, and most people will actually only care about one or two centuries, I'd just memorize the relevant factors).For the factor determined by the year within the century, let T be the tens digit of that year and U the ones digit.
If T is even, the factor is:
I'll cover LE below.If T is odd, the factor is:
LO() and LE() are corrections to take into account leap years in years where U != 0. Leap years when U = 0 are already accounted for in the 2 x T. Here are LE() and LO(). Or in English, in even decades add 1 if U >= 4, and add another 1 if U >= 8. In odd decades, add 1 if U >= 2, and another 1 if U >= 6.Example: 2020. Century 20 factor = 2, T=2, U=0. T is even. Doomsday is 2 + 2 x 2 + 0 + 0 = 6 (Saturday).
Here are the years used for some of the examples in the link you gave.
2019. T=1, U=9. We've got an odd T, and a leap year correction of 2. Century is still 20. That gives us 2 + 2 x 1 + 3 + 2 + 2 = 4 (Thursday). I've taken the liberty of reducing mod 7 along the way, so used 2 instead of 9 when adding in U. Note that when figuring the leap year factor you have to use the actual U, not U mod 7.
2018. 2 + 2 + 3 + 1 + 2 = 3 (Wednesday).
2017. 2 + 2 + 3 + 0 + 2 = 2 (Tuesday).
2069. 2 + 2 x 6 + 2 + 2 = 4 (Thursday).
1929. 3 for 19xx. 3 + 2 x 2 + 2 + 2 = 4 (Thursday).
1999. 3 + 2 x 2 + 3 + 2 + 2 = 0 (Sunday).
1982. 3 + 2 x 1 + 2 = 0 (Sunday).
1969. 3 + 2 x 6 + 2 + 2 = 5 (Friday).
2167. 0 + 2 x 6 + 0 + 1 = 6 (Saturday).