Professional Documents
Culture Documents
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)
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
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