The Web This Blog

Thursday, October 18, 2007

Name of the day Calculation

Without see the calendar you can’t say what the day of 30th September 1982 was. It is boring to store old calendar. If you learn a rule you can easily say any day of any year.

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

Hare, M= Month.
D= Day.
Y= Year.
C= First two Numbers of the year





Example0: 30/09/1982

A = (2.6*M-0.2) +D+Y+(Y/4) +(C/4)-2*C
= (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.

Example1: 18/10/2007

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