There are two things you might want to consider when following the algorithm in this post.
If you are looking at the normal ranges used in competition:
a) Jan 1, 1600 - Dec, 31, 2099 @ 1 minute
b) Current century (2000 - 2099) @ 20 dates
…you are better off adding 1 to the century codes, so that 2000 and 1600 are 0. That way you can completely ignore the century when doing the current century, plus there is a 40% chance that you don’t need to calculate the century for the 1600-2100 range.
N.B.: if you add 1 to the century, you have to deduct 1 from the month. So instead of Jun 2000 being 4 (June) + 6 (20__) = 10 / 7 = 1 remainder 3; you are looking at 3 (June) + 0 (20__) = 3.
Rather than using a slow formula for the year code, simply place them in seven distinct memory palaces and use reverse lookup to get the code for the year.