You are on page 1of 24

HOW TO CALCULATE

THE DAY OF THE WEEK


FROM ANY DATE

By
Sandesh Tallera
Objective
In this session,
We will learn how to find
the day of the week
(Monday – Sunday)
for any date
st
from 1 January 1600
st
to 31 January 2399
Prerequisites

Addition
Subtraction
Division
Modulus
Magical Steps
Learn Magic Number of Month
Learn Magic Number of Year
Learn Magic Number of Century
Learn Leap Year
Learn Magic Formula
Practice Magic Formula
Magic Number of Month
January = 0/6* July = 6
February = 3/2* August = 2
March = 3 September = 5
April = 6 October = 0
May = 1 November = 3
June = 4 December = 5
Month Magic Pattern - 0 3 3 6 1 4 6 2 5 0 3 5
Month Magic Pattern*- 6 2 3 6 1 4 6 2 5 0 3 5
* For Leap Year
Leap Year
if (year is not divisible by 4) then (it is a common year)
else if (year is not divisible by 100) then (it is a leap year)
else if (year is not divisible by 400) then (it is a common year)
else (it is a leap year)

1997 – Not a leap year


2000 – A leap year
1900 – Not a leap year
1600 – A leap year
Practice - Magic Number of Month
Date 18th August 1997
Magic Number of Month = 2

Date 14th January 1984


Magic Number of Month = 6

Date 8th February 1800


Magic Number of Month = 3

Date 8th February 2000


Magic Number of Month = 2
Practice - Magic Number of Month
Date 10th December 2003
Magic Number of Month = 5

Date 7th July 2012


Magic Number of Month = 6

Date 26th January 2000


Magic Number of Month = 6

Date 14th February 2200


Magic Number of Month = 3
Magic Number of Century
1600s (1600-1699) = 6
1700s (1700-1799) = 4
1800s (1800-1899) = 2
1900s (1900-1999) = 0
2000s (2000-2099) = 6
2100s (2100-2199) = 4
2200s (2200-2299) = 2
2300s (2300-2399) = 0
Century Magic Pattern – 6 4 2 0
Practice - Magic Number of Century
Date 18th August 1997
Magic Number of Century = 0

Date 14th January 2013


Magic Number of Century = 6

Date 8th February 1800


Magic Number of Century = 2

Date 8th February 1757


Magic Number of Century = 4
Practice - Magic Number of Century
Date 10th December 1603
Magic Number of Century = 6

Date 7th July 2012


Magic Number of Century = 6

Date 15th August 1947


Magic Number of Century = 0

Date 2nd October 1869


Magic Number of Century = 2
Magic Number of Year
YY/4 & round off to the lower side (Quotient)
(YY is last two digits of the 4 digit Year)

Example
Date 26th October 1997
YY = 97
Magic Number of Year = 97/4 = 24
Practice - Magic Number of Year
Date 18th August 1985
Magic Number of Year = 85/4 = 21

Date 14th January 2013


Magic Number of Year = 13/4 = 3

Date 8th February 1800


Magic Number of Year = 00/4 = 0

Date 8th February 1758


Magic Number of Year = 58/4 = 14
Practice - Magic Number of Year
Date 10th December 1603
Magic Number of Year = 03/4 = 0
Date 7th July 2012
Magic Number of Year = 12/3 = 4

Date 15th August 1947


Magic Number of Year = 47/4 = 11
Date 2nd October 1869
Magic Number of Year = 69/4 = 17
Magic Formula
Date
+
Magic number of month
+
Modulus
Magic number of year
7
+
Magic number of century
+
Last two digits of the year
Modulus Function
A Mod B
(Mod is Remainder of A divided by B)

Example
A = 30, B = 8
30 Mod 8 = Remainder of 30/8 = 6
Magic Days
0 → Sunday
1 → Monday
2 → Tuesday
3 → Wednesday
4 → Thursday
5 → Friday
6 → Saturday
Practice
Find day on 27th July 1983 (My Birthday)

Date = 27
Magic Code for Month = 6
Magic Code for Year = 83/4 = 20
Magic Code for Century = 0
Last two digits = 83

Magic Formula
(27 + 6 + 20 + 0 + 83) Mod 7 = 136 Mod 7
= 3 i.e. Wednesday
Practice
Find day on 07th July 2012

Date = 7
Magic Code for Month = 6
Magic Code for Year = 12/4 = 3
Magic Code for Century = 6
Last two digits = 12

Magic Formula
(7 + 6 + 3 + 6 + 12) Mod 7 = 34 Mod 7
= 6 i.e. Saturday
Practice
Find day on 15th August 1947

Date = 15
Magic Code for Month = 2
Magic Code for Year = 47/4 = 12
Magic Code for Century = 0
Last two digits = 47

Magic Formula
(15+2+12+0+47) Mod 7 = 75 Mod 7
= 5 i.e. Friday
Practice
Find day on 26th January 2020

Date = 26
Magic Code for Month = 6
Magic Code for Year = 20/4 = 5
Magic Code for Century = 6
Last two digits = 20

Magic Formula
(26+6+5+6+20) Mod 7 = 63 Mod 7
= 0 i.e. Sunday
Practice Question
Find day on your Birthday

Date =
Magic Code for Month =
Magic Code for Year =
Magic Code for Century =
Last two digits =

Magic Formula
(_+_+_+_+_) Mod 7 = __ Mod 7
= __ i.e. ____
Practice Question – Home work
1. Find day when Mahatma Gandhi was born ?
2. Find day on 1st day of year 17th Century ?
3. Find day when Chhatrapati Shivaji Maharaj was born ?
4. Find day on Jallianwalla Tragedy happened ?
5. Find day for Demolition of Babri Masjid at Ayodhya ?
6. Find day when terrorists attacked the Indian Parliament ?
7. Find day when first-ever Lahore-Amritsar bus started ?
8. Find day when junta curfew was observed by India ?
Next Session
How to solve Rubik’s Cube

By
Harshil Mogra

You might also like