Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Terms Related to Calendars
3.
Basic Concepts
4.
Odd Days
4.1.
Number of Odd Days in a Month
4.2.
Number of Odd Days in a Year
5.
Problems
5.1.
Question 1
5.2.
Solution 1 
5.3.
Question 2 
5.4.
Solution 2
6.
Frequently Asked Questions
6.1.
What is a calendar?
6.2.
How do we check if a specific year is a leap year or not?
6.3.
What is the precise number of days in a leap year?
6.4.
What are "odd days"?
6.5.
What is a Gregorian calendar?
7.
Conclusion
Last Updated: Mar 27, 2024
Easy

Calendars

Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

Introduction

A calendar is a tool for organizing and tracking time, typically dividing it into days, weeks, and months and marking important events and holidays. "Calendars" is a common topic in aptitude tests, focusing on testing the candidate's ability to perform mental calculations and reasoning. This article will discuss calendars in detail. It is vital to have a basic understanding and quick mental arithmetic skills to perform well in this topic.

Calendars

Let us begin with some basic concepts that will help us solve the problems related to calendars.

Terms Related to Calendars

You should know the precise meaning of essential terms related to calendars. Here are some standard calendar terms.

Term

Meaning

Date A specific day of the year, month, and day as specified.
Day A 24-hour period starting from midnight
Week A period of seven days, usually considered as starting from Sunday and ending on Saturday.
Month A period of 30/31 days.
Normal Year This consists of 365 days, i.e., 52 weeks, and the last day would be an odd day for sure. It would shift the calendar ahead or behind by a specific day. 
Leap Year A year that has one added day, the 29th of February, making it 366 days long.
Julian Calendar A calendar introduced by Julius Caesar in 45 BCE, which was based on a year length of 365.25 days
Gregorian Calendar Pope Gregory introduced this calendar in 1582, based on a year length of 365.2425 days, and it is widely used today.
Odd days In a calendar, "odd days" refer to the extra or surplus days that cannot be evenly divided by 7. In simple words, these are the number of days that cannot complete a week.

Let us now move further and learn some basic concepts about calendars.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Basic Concepts

The following are some of the concepts related to calendars that are often used in aptitude exams:

  • Days in a week, month, and year: A week has seven days (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday), a month has either 30 or 31 days (with February having either 28 or 29 days in a leap year), and a year has 365 days (366 days in case of a leap year).
     
  • Finding the day on a specified date: Given a date (day, month, and year), one needs to calculate the day of the week for that date. This can be done by using various mathematical algorithms and formulae. 
     
  • Leap year calculation: A leap year is a year that has an extra day (February 29th) compared to a normal year. The Gregorian calendar rules for determining a leap year are: a year is a leap year if it is completely divisible by 4, except centuries; however, years that are evenly divisible by 400 are still leap years.
     
  • Calculating the number of days between two dates: Given two dates, one can calculate the number of days between them by subtracting the earlier date from the later date and considering the number of leap years between them.
     
  • Gregorian and Julian calendars: The Gregorian calendar is used worldwide and was introduced in 1582 to replace the Julian calendar. The main difference between the two calendars is the calculation method of leap years. The Gregorian calendar uses the rules mentioned in point 3, while the Julian calendar had a more straightforward rule, where any year evenly divisible by four was considered a leap year.
     

One must note that the specific topics covered in a calendar aptitude test may vary depending on the exam and the purpose for which it is taken.
Let us now talk about odd days in more detail. Knowing about odd days helps you solve calendar-related questions quickly.

Odd Days

To find the number of odd days, we need to find the remainder after dividing the number of days by 7. We will understand how the number of odd days is calculated with the help of examples.

Number of Odd Days in a Month

Suppose we want to find the number of odd days in the month of March 2022. March has 31 days in the Gregorian calendar. 

To find the odd days in the month, we can divide the total number of days in the month (31) by 7 and find the remainder. In this case, 31 divided by 7 has a remainder of 3. 

That means there are three odd days in the month of March 2022. 

Number of Odd Days in a Year

Suppose we want to find the number of odd days in the year 2022.

We know a non-leap year has 365 days, and a leap year has 366 days. 2022 is a non-leap year.

To find the odd days in a non-leap, we can divide the total number of days in the year (365) by 7 and find the remainder. In this case, 365 divided by 7 has a remainder of 1. This means there is 1 odd day in the year 2022.

Therefore, the last day of the year will be one day ahead of the first day of the year.

Now calculating the number of days each time can be time-consuming. To save time, we recommend you remember the following table showing the number of odd days.

Time Duration

Number Of Odd Days

Months having 31 days 3
Months having 30 days 2
The month of February (Normal/Leap) 0/1
Normal Year 1
Leap Year 2
1 Century (100 consecutive years) 5
2 Centuries (200 consecutive years) 3
3 Centuries (300 consecutive years) 1
4 Centuries (400 consecutive years) 0

Every 400 years, the number of odd days is 0 (The years 400, 800, 1200, 1600, 2000, and so on have 0 odd days).

The following table shows the relation of days of the week with odd days.

Days of the week

Number of odd days

Sunday 0
Monday 1
Tuesday 2
Wednesday 3
Thursday 4
Friday 5
Saturday 6

 

Let's finally solve some problems based on calendars:

Problems

Following are some commonly asked questions from this topic.

Question 1

If it was a Thursday on September 12, 2019. What day was September 12, 1983? 

Solution 1 

To find the day on September 12, 1983, our first step will be to count the number of odd days. 

Between the years 1983 and 2019, there are 36 years. This means 36 odd days (1 normal year has 1 odd day)

Now, find out how many leap years fall in these 36 years. That is because each leap year has two odd days. We need to consider that to get the correct answer.

To find the number of leap years between 1983 and 2019, you can use the following formula:

number of leap years = (number of years divisible by 4) - (number of years divisible by 100) + (number of years divisible by 400)


Applying this formula:

number of years from 1983 to 2019 = 2019 - 1983 
                                                                = 36

number of years divisible by 4 = 36 / 4 
                                                      = 9

number of years divisible by 100 = 1 [the year 2000]

number of years divisible by 400 = 1 [the year 2000]
 

number of leap years = 9 - 1 + 1 
                                      = 9
 

So, there are nine leap years between 1983 and 2019. These are 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, and 2016. 

That means there are nine more odd days. 
 

Hence, the total number of odd days = 36 + 9 
                                                                 = 45 days. 
 

Now, let's find 45mod7 to find how many complete weeks we can get out of these days.
 

The total number of odd days = 45mod7 
                                                     = 3 

45 days will have six complete weeks and three odd days left out. 
 

Going back three odd days from Thursday, we'll get Monday. As a result, September 12, 1983, would be a Monday

Let’s now look at another question.

Question 2 

What day was on May 15, 1723?

(a) Monday 
(b) Saturday 
(c) Wednesday 
(d) Thursday 

Solution 2

To find the solution, we will find the number of odd days until 1723. Firstly, we will find it till the year 1700.
 

Number of odd days till 1700 = 5 [odd days till 1600 = 0; odd days in the next 100 years = 5].
 

Now we need to find the odd days in the next 23 years. For that, we need to know the number of leap years and normal years.
 

To find the number of leap years between 1700 and 1723, you can use the following formula:

number of leap years = (number of years divisible by 4) - (number of years divisible by 100) + (number of years divisible by 400)


Applying this formula:

Number of years from 1700 to 1723 = 1723 - 1700 
                                                                 = 23
Number of years divisible by 4 = 6

Number of years divisible by 100 = 1 [the year 1700]

Number of years divisible by 400 = 0 
 

Number of leap years = 6 - 1 + 0 
                                       = 5
 

And, number of normal years = (number of years between 1723 and 1700) - (number of leap years between 1723 - 1700)


number of normal years = 23 - 5
                                           = 17
 

So, there are 5 leap years and 17 normal years between 1700 and 1723.
 

Odd days in 5 leap years = 5*2 [leap years have two odd days]
                                             = 10

Odd days in 17 normal years = 17 * 1 [normal years have one odd day]
                                                  = 17
 

So, the Number of odd days in the next 23 years = 10 + 17 
                                                                                      = 27mod7 
                                                                                      = 6 
 

No. of odd days in Jan, Feb, March, April, and 15 days of May = 3 + 0 + 3 + 2 + (15mod7)
                                                                                                            = 9mod7
                                                                                                            = 2

Total odd days = 5 + 6 + 2 
                           = 13mod7
                           = 6 
 

6th day is Saturday. Thus, 15th May 1723 was Saturday.

Let us now address some of the frequently asked questions.

Frequently Asked Questions

What is a calendar?

A calendar is a tool for organizing and tracking time, typically dividing it into days, weeks, months, and years. It is also used for marking important events and holidays.

How do we check if a specific year is a leap year or not?

To check whether a specific year is a leap year, divide the year by 4. If it is fully divisible by 4, it can be termed a leap year. However, years like 300, 700, 1900, 2000, etc., are centuries and need to be divided by 400 to see whether they are leap years.

What is the precise number of days in a leap year?

The exact number of days in a leap year of the Gregorian calendar is 365.2425 days.

What are "odd days"?

In a calendar, "odd days" refer to the extra or surplus days that cannot be evenly divided by 7. In simple words, these are the number of days that cannot complete a week.

What is a Gregorian calendar?

This calendar was introduced by Pope Gregory in 1582. It is based on a year of 365.2425 days and is widely used today.

Conclusion

In this blog, we've covered the calendars topic of the aptitude section. We also learned about its basic concepts and odd days. Finally, we solved some questions related to this topic.

You can refer to the following articles to prepare for competitive exams.

You may refer to our Guided Path on Code Studios for enhancing your skill set on DSACompetitive ProgrammingSystem Design, etc. Check out essential interview questions, practice our available mock tests, look at the interview bundle for interview preparation, and so much more!

Happy Learning, Ninjas!

Previous article
Seating Arrangements
Next article
Tips & Strategy to Crack Aptitude Test Online For Free
Live masterclass