This algorithm didn't appear out of nowhere. Maybe this page should mention the source?
I had pictured this as being essentially Gauss's algorithm, but if Wikipedia is correct, this particular implementation is due to Tomohiko Sakamoto in 1993.
https://en.wikipedia.org/wiki/Determination_of_the_day_of_th...