shelley
chang
Specifically, I'm not positive of this, but I believe there are irregularities in the calendar that would throw him off if he didn't know the changes. I just looked at year 800, and with my algorithm, I would get those dates wrong, so it doesn't make sense, especially with a human invention, to just "know" what day it is.
I learned how to calculate day of the week, and in the process I learned way too much about calendars. In 1582 Pope Gregory XIII decided to switch from the Julian calendar to the calendar we use today (the Gregorian calendar adds leap days to century years only if they are divisible by 400. Julian calendar just had leap years every 4 years and was about 10 days off from the solar cycle at that time).
Italy and other Catholic countries (mostly in southern Europe) adopted the Gregorian calendar around that time. The Protestant countries were slower to catch on. In the 1700s Sweden tried dropping all of their leap days for 40 years instead of dropping 10 days all at once (apparently ignoring the fact that this would put them out of sync with both the Julian and Gregorian calendars for 40 years). The system was poorly administered (partly due to the Great Northern War breaking out at the time) and the leap days that should have been dropped in 1704 and 1708 weren't. King Charles of Sweden decided to revert to the Julian calendar by adding an extra leap day to February in 1712, resulting in a February 30, 1712 (but only in Sweden).
Most of the Protestant European countries switched over in the mid 1700s. England made the switch in September of 1752, which is why when you type
Code:
cal 9 1752
tl;dr: When you looked at the year 800 it was on the Julian calendar, not the calendar we use now, which is why your algorithm doesn't work. Also, there was a February 30 in Sweden. Funny story.