For solving the calendar problems we may need the following info.
How to find whether a year is leap year or not ?
1) We get a leap year if that year is divisible by 4 exactly
2) Years divisible by 100 and not by 400 is not a leap year
100 years has 5 odd days
400 years has (20+1) odd days ie , 0 odd days.
Step 1: Find leap year or not.
Step 2: Find out total odd days on months.
Step 3: Find out the total odd days on year.
Step 4: Finally add the total number of odd days between the given dates.
1 is Monday
2 is Tuesday
3 is Wednesday
4 is Thursday
5 is Friday
6 is Saturday
0 or 7 is Sunday