Julian day
The day of the week can be easily calculated given a date's Julian day number (JD, i.e. the integer value at noon UT):