This question relates to the classic Dommsday algorithm.
A simple calculation method is the Kraichik method.
Kraichik Method -
w = d + m + c + y mod 7,
where w is the day of the week (counting up from 1 on Sunday instead of 0 in the Gauss version),
and d, m, c, and y are numbers depending on the day, month, and year, as in the following tables:
Month 1 2 3 4 5 6 7 8 9 10 11 12 m 1 4 3 6 1 4 6 2 5 0 3 5
For the Gregorian calendar, take the centenary of the year (for example, in 1986 - 1900, 2014 - 2000). [Century / 100] mod 4: 0 1 2 3
c: 0 5 3 1
For the Julian calendar,
[Century / 100] mod 7: 0 1 2 3 4 5 6
c: 5 4 3 2 1 0 6
Finally, the year number is obtained from this table (with the subtraction of 1 from the dates in January or February):
The last two digits of year y
00 06 17 23 28 34 45 51 56 62 73 79 84 90 0 01 07 12 18 29 35 40 46 57 63 68 74 85 91 96 1 02 13 19 24 30 41 47 52 58 69 75 80 86 97 2 03 08 14 25 31 36 42 53 59 64 70 81 87 92 92 98 3 09 15 20 26 37 43 48 54 65 71 76 82 93 99 4 04 10 21 27 32 38 49 55 60 66 77 83 88 94 5 05 11 16 22 33 39 44 50 61 67 72 78 89 95 6
What is it. You can get more details about the details from wikipedia
Arvind sharma
source share