How to solve Calendar problems | SureSolv

How to solve Calendar problems

Calendar is designed to keep track of time over longer duration than clock

how to solve calendar problems

A clock measures smaller time intervals like seconds, minutes and hours. Humans devised the mechanism of a calendar for dividing time in larger intervals.

There are many calendars used all over the world. It is just like many languages and cultures. We will discuss here the calendar we generally use, the calendar that starts with 1 AD and says, this year is 2018 AD.

Calendar units

Day: The smallest interval or unit in a calendar is a day. The link with a clock and calendar is in the fact that 24 hours make a day.

Week: Seven days make a week, the next larger period of time. That is a certainty. Weekdays are, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday in sequence that repeats. These names are easy to remember compared to numbers.

Month: The next larger interval or unit in a calendar is a month and finally 12 months make a year. Months are, January, February, March, April, May, June, July, August, September, October, November and December in sequence and repeating over years.

General Concept: No fixed number of weeks or days make a month or year, though generally, if nothing else is specified, we take,

  • a month has 4 weeks
  • a month has 30 days
  • a year has 52 weeks
  • a year has 365 days

Printed Calendars that we see are yearly calendars, but actually a calendar is a series of years starting in the past at some defined point of zero and proceeding into the future. We divide continuing time into years for convenience of leading our lives.

Specific properties of Calendar

Properties of a year:

  • There are two kinds of years: Ordinary year and Leap year.
  • An ordinary year has 365 days and a leap year has 366 days, one day extra. This extra day appears in February which in a leap year has 29 days instead of 28.

Leap year rule:

A year to be a leap year, it must satisfy two conditions. First, it must be divisible by 4, such as 2016, 5324 and so on. By this rule every century year should be a leap year. But for a century year to be a leap year, there is a second rule, a century year must be divisible by 400 to be a leap year. 1600, 2000, 2400 are leap years but 1900, 2100, 2200 are not.

Working with weekdays and dates:

Most times we work with weekdays and the dates. To go forward or backward in terms of number of days, months or years and still be able to know the weekday and date, a special concept odd day has been created.

Number of odd days in a given number of days is the remainder when dividing the period in weeks, that is, dividing by 7.

For example, January always has 31 days, so its number of odd days is 3 which is the remainder after dividing 31 by 7.

Odd days in a year:

An ordinary year has 52 weeks and 1 odd day, while a leap year has 2 odd days as it has 1 day extra in February.

That’s why, the same date after one year is the next day of the week if it is an ordinary year. 14-11-2014 is Friday, so 14-11-2015 must be Saturday.

Odd days in a century:

In an ordinary century, there will be 24 leap years and 76 ordinary years. This is because the end year of the century, say, 2100 won't be a leap year. So total number of odd days in an ordinary century is,

$24\times{2}+76=124$.

Dividing by 7 again, the remainder odd days in an ordinary century is, $(124-119)=5$. Thus we have the fixed rule,

In an ordinary century, resultant odd days will be 5.

In a century with century year as a leap year, say in 2400, there will be one odd day extra, that is, 6. So the fixed rule for a century for which end year is divisible by 400 is,

For a leap year century, number of odd days will be 6.

Odd days in 400 years:

This gives us the measure of number of odd days in a larger span of 400 years as, remainder of dividing (5+5+5+6)=21 by 7 giving 0. Thus we have the fixed rule,

For 400 years number of resultant odd days is 0.

The start day of a calendar we generally use:

There must be a start days of the calendar we use. It is defined as,

1st day of 1 AD is a Monday, and so 0th day is a Sunday.

All other weekdays follow from this definition.

Odd days in 12 months in a year:

An year has 12 months, each with a fixed number of days and and so fixed number of odd days. The following is a month-wise chart of number of odd days,

Odd-days-in-each-month.jpg

Modulo 7 operation:

Modulo operation is part of extended arithmetic. It simply is the remainder after dividing an integer by a number, in our case by 7.

For example,

$\text{modulo 7}(5+5+4+3)=\text{modulo 7}(17)=3$, the remainder after dividing 17 by 7. 

In odd day accumulation over months of a year, or years of a century, after we add up the number odd days, we divide the sum by 7 and get the remainder as number of odd days in the whole period

Now we will cosolidate these concepts by solving a few problem examples on calendar.

Problem examples on calendar

Calendar problem 1:

If it is a Monday on 1st October 2012, what day will it be on 21st December, 2013?

Calendar problem solution 1:

Till 1st October 2013 it is intervening 1 ordinary year with 365 days and 1 odd day. Rest number of days up to 21st December is 81 and odd days 4.

Total odd days = 4 + 1 = 5.

So the weekday on 21st December 2013 will be 5 days after Monday which is a Saturday.

Calendar problem example 2:

If it is a Monday on 1st October 2012, what day will it be on 21st March, 2411?

Calendar problem solution 2:

Given a weekday and date, finding out a future or past weekday when date is given requires finding out number of odd days in the number of intervening days.

Number of odd days in 2012:

Total odd days, (30+30+31)=91. So odd days in 2012 is 0 (as 7 divides 91 fully with 0 remainder).

Number of odd days in 2013-2100:

88 years left have 21 leap years each with 2 odd days and 67 ordinary years each with 1 odd day. So total odd days is,

$21\times{2}+67=109$, dividing by 7 gives remainder odd digits as 4.

Note that year 2100 is not a leap year (year 400, 800, 1200, 1600, 2000, 2400, and so on are leap years).

Number of odd days in 22nd century, 23rd century and 24th century:

Each ordinary century has 24 leap years and 76 ordinary years, whereas in a century with century year as a leap year, we get 25 leap years and 75 ordinary years. So in an ordinary century we have the number of odd days as,

$\text{Number of odd days in an ordinary century}$

$= \text{modulo 7} (76\times{1} + 24 \times{2}) = \text{modulo 7} (124) = 5$

If the century is a leap year century, its number of odd days turns to 6.

Here we have three intervening centuries 22nd, 23rd and 24th, last being a leap year century.

So number of odd days in these three centuries is,

$\text{modulo 7}(5 + 5 + 6) = 2$.

Number of odd days in first 10 years of 25th century:

In 25th century in the first 10 years the number of odd days will be,

$\text{modulo 7}(8\times{1} + 2 \times{2}) = 5$, 2404 and 2408 will be leap years.

Number of odd days in 25th century up to 21st March, 2411:

Lastly in 2411 upto 21st March 2411, we have (31+28+21)=80 days and so 3 odd days.

Total number of odd days:

Finally, Total intervening odd number of days is,

$\text{modulo 7} (0+4 + 2 + 5 + 3) = 0$.

Thus 21st March 2411 would also be a Monday.

Calendar problem 3:

What was the weekday on 20 June 1354?

Calendar Problem Solution 3:

The usual calendar starts with 1st January, 1 AD as a Monday, that is, 0th day of January, 1 AD on a Sunday.

This mechanism enables you to get intervening odd days up to say, 31st December 100 AD as exactly 5 (full 100 years difference as starting point is 0) and so the weekday will be 5 days after Sunday, that is, Friday.

Thus, in the first 1200 years number of odd days is 0 as each 400 years number of odd days is 0 (5+5+5+6=21=>0).

In 13th century odd days is 5.

In first 53 years of 14th century, 13 leap years and 40 ordinary years contribute to odd days as,

$\text{modulo 7}(13 × 2 + 40) = \text{modulo 7} (66) = 3$.

In 1354 (a normal year) up to 20th June, number of days is = (31 + 28 + 31 + 30 + 31 + 20) = 171 giving a number of odd days 3.

Thus,

$\text{Total odd days} = \text{modulo 7} (0 + 5 + 3 + 3) = \text{modulo 7}(11) = 4$.

So the required weekday is 4 days after Sunday, that is, Thursday.