✔ 最佳答案
First, you need to use these two tables:
Table 1.
Jan = 0 (6 if leap year)
Feb = 3 (2 if leap year)
Mar = 3
Apr = 6
May = 1
Jun = 4
Jul = 6
Aug = 2
Sep = 5
Oct = 0
Nov = 3
Dec = 6
Table 2.
Mon = 1
Tue = 2
Wed = 3
Thurs = 4
Fri = 5
Sat = 6
Sun = 0
For any date in AD (AD only, this method cannot use on BC)
- Take any year (including the century, eg. 1998 not 98)
- Divide the year by 4 and ignore any remainder. Add this result onto the year
- Divide the year by 100, ignore any remainder and subtract this from the total
- Divide the year by 400, ignore any remainder and add this to the total
- Add the date (day of the month)
- Add the month number from the table as before
- Subtract 1 from the total
- This gives you the day of the week
Example
On which day of the week was the 9th of March 1879?
1879 / 4 = 469, 1879 + 469 = 2348
1879 / 100 = 18, 2348 - 18 = 2330
1879 / 400 = 4, 2330 + 4 = 2334
2334 + 9 = 2343
Using the month number from Table 1, 2343 + 3 = 2346
2346 - 1 = 2345
2345 / 7 = 335 remainder 0
From Table 2, 09/03/1879 was a Sunday
source from...
http://jonathan.rawle.org/hyperpedia/day_calculation.php