Example 5 - What will be the day on 17th June, 1998?
Solution:
Step 1: Find number of odd days in the passed CENTURY
Till 1900, there is 1 odd day. (As 1900 =1600+300. For every 400 years there are 0 odd days and for every 300 years there is one odd day).
Step 2: Find number of odd days in the passed YEAR(S).
From 1901 to 1997, there are 24 leap years (1904, 1908, 1912 till and 1996) and 73 ordinary years.
Hence odd days = 24*2 + 73*1 = 48+73 = 121 odd days = 2 odd days. (The remainder when 121 divided by 7 is 2)
Step 3: Find number of odd days in the current year TILL PREVIOUS MONTH END
From Jan 1998 to May 1998 there are 31+28 (as 1998 is not a leap year) + 31 + 30 + 31 = 151 days.
Odd days = remainder of 151 divided by 7 = 4 odd days.
Step 4: Find number of odd days in the current month TILL GIVEN DATE
From 01-Jun-1998 to 17-Jun-1998 there are 17 days.
Odd days = remainder of 17 divided by 7 = 3 odd days.
Step 5: Add all odd days in above steps.
Total odd days = 1+2+4+3=10
Step 6: Divide by 7 and find the remainder. Map it to the days (0-Sun, 1-Mon,..., 6-Sat)
Final odd day count = remainder of 10 divided by 7 = 3.
3 correspond to Wednesday. Hence the 17-June-1998 is a Wednesday.