The following steps were taken in calculating the day of the week based on the date entered above
- Determine the Century Code
- Using the year entered above we can determine the century code. See the century code table below!
- Determine the Quotient & the Remainder
- We first reformat the year to be two digits
(e.g., 'abcd' becomes 'cd')
- Then we divide 'cd' by 12 and we get 'cd'/12 with a remainder of x
- Determine how many times 4 goes into the remainder
- Dividing x by 4 we get x/4 with a remainder of #
- Now we determine the Doomsday value based on the month and date
- Using the month entered above we can determine the doomsday value for that month using the table below.
- Next we take the date value entered above and we subtract the month's doomsday value which gives us a Doomsday value of #
- Now we take the sum of the 5 values determined in steps 1-4 and we calculate the remainder after dividing by 7
- Sum = Century Code + Quotient + Remainder + Reminder/4 + Doomsday
- Sum divided by 7 is # with a remainder of #
- Finally, compare your final result from step 5 to the following table to find the corresponding day of the week:
Sunday |
Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
Saturday |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
Century Code Table:
5 |
3 |
2 |
0 |
|
|
1-99 |
100-199 |
200-299 |
300-399 |
400-499 |
500-599 |
600-699 |
700-799 |
800-899 |
900-999 |
1000-1099 |
1100-1199 |
1200-1299 |
1300-1399 |
1400-1499 |
1500-1599 |
1600-1699 |
1700-1799 |
1800-1899 |
1900-1999 |
2000-2099 |
2100-2199 |
2200-2299 |
2300-2399 |
2400-2499 |
2500-2599 |
2600-2699 |
2700-2799 |
2800-2899 |
2900-2999 |
3000-3099 |
3100-3199 |
3200-3299 |
3300-3399 |
3400-3499 |
3500-3599 |
3600-3699 |
3700-3799 |
3800-3899 |
3900-3999 |
4000-4099 |
4100-4199 |
Doomsday by Month:
Month |
Doomsday Value |
January |
Leap Year |
Non-Leap Year |
4 |
3 |
|
February |
Leap Year |
Non-Leap Year |
29 |
28 |
|
March |
14 |
April |
4 |
May |
9 |
June |
6 |
July |
11 |
August |
8 |
September |
5 |
October |
10 |
November |
7 |
December |
12 |