CALENDAR

Important Formulas & Concepts

  • Zeller’s Congruence Formula: Used to find the day of the week for any given date.
    Formula:
    h = (q + ⌊(13(m+1))/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J) mod 7
    Where:
    - h = day of week (0 = Saturday, 1 = Sunday, 2 = Monday, ..., 6 = Friday)
    - q = day of the month
    - m = month (3 = March, 4 = April, ..., 12 = December; January and February counted as months 13 and 14 of previous year)
    - K = year of the century (year % 100)
    - J = zero-based century (year / 100)
  • Doomsday Algorithm: A quick mental math method to find the weekday.
    It uses anchor days for centuries and memorizes "Doomsdays" of months.
    Example doomsdays: 4/4, 6/6, 8/8, 10/10, 12/12, 5/9, 9/5, 7/11, 11/7.
  • Leap Year Rules:
    - Year divisible by 4 → Leap year
    - Century year (divisible by 100) must be divisible by 400 to be a leap year
    Example: 2000 is leap, 1900 is not.
  • Number of Days in Months:
    Jan-31, Feb-28/29, Mar-31, Apr-30, May-31, Jun-30, Jul-31, Aug-31, Sep-30, Oct-31, Nov-30, Dec-31.

Explanation & Sample Problem

To find the day of the week on a particular date, we use formulas like Zeller’s Congruence or the Doomsday algorithm. Let's solve an example using Zeller’s formula:

Example: Find the day of the week on 15th August 1947.

  • Given: q = 15 (day), m = 8 (August), year = 1947
  • Since August > 2, m = 8, year stays 1947.
  • K = 47 (1947 % 100)
  • J = 19 (1947 / 100)

Apply formula:

    h = [15 + floor(13(8+1)/5) + 47 + floor(47/4) + floor(19/4) + 5*19] mod 7
      = [15 + floor(117/5) + 47 + 11 + 4 + 95] mod 7
      = [15 + 23 + 47 + 11 + 4 + 95] mod 7
      = 195 mod 7
      = 6
    

Where h=6 corresponds to Friday (0=Saturday, 1=Sunday,...6=Friday). So, 15th August 1947 was a Friday.

Previous Year Questions with Solutions

  1. SSC CGL 2020: What day of the week was 15th August 1947?
    Answer: Friday (Solved above)
  2. RRB NTPC 2019: Find the day of the week on 1st January 2000.
    Solution: January and February are treated as months 13 and 14 of previous year.
    q=1, m=13, year=1999, K=99, J=19
    h = (1 + floor(13*14/5) + 99 + floor(99/4) + floor(19/4) + 5*19) mod 7
    h = (1 + 36 + 99 + 24 + 4 + 95) mod 7 = 259 mod 7 = 0 → Saturday
    Answer: Saturday
  3. SSC CHSL 2018: How many Sundays are there in March 2021?
    March 2021 starts on Monday (1st March 2021 is Monday). Sundays fall on 7,14,21,28.
    Answer: 4 Sundays
  4. HSSC JE 2019: What day of the week was 26th January 1950?
    Using Zeller’s formula or known calendars:
    Answer: Thursday
  5. SSC MTS 2021: If 1st January 2021 was a Friday, what day was 31st December 2021?
    2021 is not a leap year, so total 365 days = 52 weeks + 1 day.
    So, 31st Dec 2021 will be same day + 364 days + 1 day = Friday + 1 day = Saturday.
    Answer: Friday (Careful: The day repeats every 7 days; 31st Dec 2021 was actually Friday.)
  6. SSC GD 2019: How many leap years are there between 1900 and 2000?
    Leap years between 1901 and 2000 are every 4 years except 1900 is not leap.
    Count: 1904, 1908, ..., 2000 (2000 is leap since divisible by 400)
    Total = 24 leap years.
    Answer: 24
StartPreparation