NTSE – Mental Ability Test
Topic: Day Calculation
Day calculation tests your ability to determine the day of the week for a given date or to find the day after a certain number of days.
The key idea is that the week repeats every 7 days, so you only need to keep track of the remainder when dividing by 7.
1. Simple Explanation
| What you need | How to do it |
|---|---|
| Date (day, month, year) | 1. Convert the date into a “day‑of‑week” number (0 = Sunday, 1 = Monday, …, 6 = Saturday). |
| Number of days to add | 2. Add that number to the day‑of‑week number and take the remainder modulo 7. |
| Leap year | 3. Remember that February has 29 days in a leap year (every 4th year, except centuries not divisible by 400). |
Why Modulo 7 Works
The week has 7 days.
If you add 7 days, you’re back on the same day of the week.
So, Day + 7 ≡ Day (mod 7).
Only the remainder after division by 7 matters.
2. Key Points
| Point | Detail |
|---|---|
| Day of Week Codes | Sunday = 0, Monday = 1, …, Saturday = 6. |
| Leap Year Rule | - Year divisible by 4 → leap year. - But if divisible by 100 → not a leap year, unless divisible by 400. |
| Month Day Counts | 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. |
| Zeller’s Congruence | A compact formula to compute the weekday for any Gregorian date. |
| Doomsday Algorithm | Uses “doomsday” (a reference weekday that repeats each year) and month codes. |
| Working Backwards | If you know the weekday of a future date, you can subtract days to find earlier weekdays (mod 7). |
| Practice Tip | Memorise the month codes for quick mental calculation. |
3. Day‑of‑Week Calculation Algorithms
3.1 Zeller’s Congruence (Gregorian Calendar)
For a date (d, m, y):
- If
mis January or February, setm = m + 12andy = y – 1. - Compute: [ K = y \bmod 100,\quad J = \left\lfloor \frac{y}{100} \right\rfloor ]
- Compute: [ h = (d + \left\lfloor \frac{13(m+1)}{5} \right\rfloor + K + \left\lfloor \frac{K}{4} \right\rfloor + \left\lfloor \frac{J}{4} \right\rfloor + 5J) \bmod 7 ]
hgives the weekday:
0 = Saturday, 1 = Sunday, 2 = Monday, …, 6 = Friday.
(Shift indices if you use Sunday = 0.)
3.2 Doomsday Algorithm (Simplified)
- Anchor day for the century (e.g., 1900 → Tuesday, 2000 → Saturday).
- Doensday for the year:
[ D = (anchor + \text{year offset}) \bmod 7 ] Year offset = (last two digits of year) + floor(last two digits / 4). - Month codes (for non‑leap years):
For leap years, Jan = 4, Feb = 29.Jan 3, Feb 28, Mar 14, Apr 4, May 9, Jun 6, Jul 11, Aug 8, Sep 5, Oct 10, Nov 7, Dec 12 - Find the difference between the day and the doomsday of that month, adjust modulo 7.
4. Worked Example
Problem:
If 1 January 2023 is a Sunday, what day of the week will be 18 March 2023?
Step‑by‑Step
| Step | Calculation | Result |
|---|---|---|
| 1 | Days in January (31) + 18 days of March = 49 days from Jan 1 to Mar 18 (including Jan 1). | 49 |
| 2 | 49 days → 49 mod 7 = 0 (since 49 = 7×7). | 0 |
| 3 | Since 0 days after a Sunday → still Sunday. | Sunday |
Answer: 18 March 2023 is a Sunday.
Another Example – Zeller’s Congruence
Find the weekday of 15 August 1947.
| Step | Value | Calculation |
|---|---|---|
| 1 | d = 15 |