Ashok Patel’s Method To Determine The Day Of The Week For Any Date Since The Start Of The Gregorian Calendar (1582)
Total = Date + Month Code + YY + floor(YY/4) + 2*(3- CC mode 4)
Month Codes: Jan=0, Feb 3, March=3, April=6, may=1, June=4, July=6, Aug= 2, Sep=5, Oct=0, Nov=3, Dec=5 If leap year Jan=6 and Feb=2
Day of the Week: (Total mod 7) gives you the day of the week.
Total mod 7 means remainder of (Total/7)which will give Day of the week as under:
- 0 = Sunday
- 1 = Monday
- 2 = Tuesday
- 3 = Wednesday
- 4 = Thursday
- 5 = Friday
- 6 = Saturday
Ashok Patel’s method for determining the day of the week for any date since the start of Gregorian Calendar (1582) onwards involves a series of calculations. Here’s how it works:
Step-by-Step Calculation:
- Date: This is simply the day of the month (1 to 31).
- Month Code: Each month has a specific code:
- January: 0 (6 if it’s a leap year)
- February: 3 (2 if it’s a leap year)
- March: 3
- April: 6
- May: 1
- June: 4
- July: 6
- August: 2
- September: 5
- October: 0
- November: 3
- December: 5
- YY: The last two digits of the year. (Example 1947 so YY=47)
- Century is CC: The first two digits of the year. (Example 1947 so CC=19)
- (CC mod 4) means CC divided by 4 and the remainder is considered. If CC=19 then (19 mod 4) = 3
- Leap Year Adjustment:
- If the year is a leap year and the month is January or February, adjust the month code as mentioned.
Calculation:
- Total = Date + Month Code + YY + Floor (YY/4) + 2*(3 – CC mod 4)
- Day of the Week: (T mod 7) gives you the day of the week:
- 0 = Sunday
- 1 = Monday
- 2 = Tuesday
- 3 = Wednesday
- 4 = Thursday
- 5 = Friday
- 6 = Saturday
-
-
- Let us check this formula to find the Day of the week for the following dates:
- 15-04-1653
- 02-09-1782
- 20-11-1834
- 04-07-1976
- 25-12-2008
- 29-02-1968
-
-
-
- Calculations:
-
-
-
-
15-04-1653 (April 15, 1653):
-
Date = 15
-
Month Code (April) = 6
-
YY = 53
-
floor(YY/4) = 13
-
CC = 16 (16 mod 4 = 0, so 3 – 0 = 3, 2*3 = 6)
-
Total = 15 + 6 + 53 + 13 + 6 = 93
-
Day = 93 mod 7 = 2 (Tuesday)
-
- 02-09-1782 (September 2, 1782):
-
Date = 2
-
Month Code (September) = 5
-
YY = 82
-
floor(YY/4) = 20
-
CC = 17 (17 mod 4 = 1, so 3 – 1 = 2, 2*2 = 4)
-
Total = 2 + 5 + 82 + 20 + 4 = 113
-
Day = 113 mod 7 = 1 (Monday)
-
- 21-11-1834 (November 21, 1834):
-
Date = 21
-
Month Code (November) = 3
-
YY = 34
-
floor(YY/4) = 8
-
CC = 18 (18 mod 4 = 2, so 3 – 2 = 1, 2*1 = 2)
-
Total = 21 + 3 + 34 + 8 + 2 = 68
-
Day = 68 mod 7 = 5 (Friday)
-
- 04-07-1976 (July 4, 1976):
-
Date = 4
-
Month Code (July) = 6
-
YY = 76
-
floor(YY/4) = 19
-
CC = 19 (19 mod 4 = 3, so 3 – 3 = 0, 2*0 = 0)
-
Total = 4 + 6 + 76 + 19 + 0 = 105
-
Day = 105 mod 7 = 0 (Sunday)
-
- 25-12-2008 (December 25, 2008):
-
Date = 25
-
Month Code (December) = 5
-
YY = 08
-
floor(YY/4) = 2
-
CC = 20 (20 mod 4 = 0, so 3 – 0 = 3, 2*3 = 6)
-
Total = 25 + 5 + 8 + 2 + 6 = 46
-
Day = 46 mod 7 = 4 (Thursday)
-
- 24-02-1968 (February 24, 1968) – Leap Year:
-
Date = 24
-
Month Code (February in Leap Year) = 2
-
YY = 68
-
floor(YY/4) = 17
-
CC = 19 (19 mod 4 = 3, so 3 – 3 = 0, 2*0 = 0)
-
Total = 24 + 2 + 68 + 17 + 0 = 111
-
Day = 111 mod 7 = 6 (Saturday)
-
-
- Summary:
-
15-04-1653: Tuesday
-
02-09-1782: Monday
-
21-11-1834: Friday
-
04-07-1976: Sunday
-
25-12-2008: Thursday
-
24-02-1968: Saturday
-
-