Without see the calendar you can’t say what the day of
Month | M |
March | 1 |
April | 2 |
May | 3 |
June | 4 |
July | 5 |
August | 6 |
September | 7 |
October | 8 |
November | 9 |
December | 10 |
January | 11 |
February | 12 |
Day | D |
Sunday | 0 |
Monday | 1 |
Tuesday | 2 |
Wednesday | 3 |
Thursday | 4 |
Friday | 5 |
Saturday | 6 |
A= (2.6*M-0.2) +D+Y+(Y/4) +(C/4)-2*C
D= Day.
Y= Year.
C= First two Numbers of the year
Example0:
= (2.6*7-0.2) +30+82+ (82/4) + (19/4)-2*19
= 18+30+82+20+4-38
= 116
Now: 116/7= mod 4
So the day was Thursday.
A = (2.6*M-0.2) +D+Y+(Y/4) +(C/4)-2*C
= (2.6*8-0.2) +18+07+ (07/4) + (20/4)-2*20
= 20+18+07+1+5-40
= 11
Now: 11/7=mod 4
So the day was Thursday
No comments:
Post a Comment