Day of the week calculator

Day of the week for any date, past or future: the weekday in the Gregorian calendar, worked through step by step with Zeller's congruence.

تازہ کاری جانچی گئی مثالیں: 5

= 2026-09-29
Any year; dates before 15 October 1582 use the Gregorian rules extended backwards.
آزمائیں
ہفتے کا دن
Tuesday
ہفتے کا دن: Tuesday
ISO weekday number (Monday = 1)
2
Zeller's h (Saturday = 0)
3
Days from today
0

Tue 29 Sep 2026 is a Tuesday — today.

September 2026 (weekends shaded)

MoTuWeThFrSaSu123456789101112131415161718192021222324252627282930
حساب کا طریقہ S
  1. Set up Zeller's variables

    q=29,K=Y mod 100=26,J=⌊Y/100⌋=20q = 29,\quad K = Y \bmod 100 = 26,\quad J = \lfloor Y/100 \rfloor = 20

    m = 9, Y = 2026.

  2. Evaluate the congruence

    h=(29+⌊13×10/5⌋+26+⌊26/4⌋+⌊20/4⌋+5×20) mod 7=(29+26+26+6+5+100) mod 7=192 mod 7=3h = (29 + \lfloor 13 \times 10 / 5 \rfloor + 26 + \lfloor 26/4 \rfloor + \lfloor 20/4 \rfloor + 5 \times 20) \bmod 7 = (29 + 26 + 26 + 6 + 5 + 100) \bmod 7 = 192 \bmod 7 = 3

    Floors round toward minus infinity, which keeps the formula valid for years before 1 AD.

  3. Read the weekday

    h = 3 means Tuesday (0 = Saturday, 1 = Sunday, …, 6 = Friday).

  4. Check with the day count

    N=20725,(N+3) mod 7+1=2⇒TuesdayN = 20725,\quad (N + 3) \bmod 7 + 1 = 2 \Rightarrow \text{Tuesday}

    1 January 1970 (N = 0) was a Thursday, ISO weekday 4.

Day of the week calculator کے بارے میں

Zeller's congruence, published in 1887, turns a date into a weekday with whole-number arithmetic. January and February count as months 13 and 14 of the previous year; the year is split into its century J and year of the century K; and q + ⌊13(m + 1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J is divided by 7. The remainder h names the weekday, from 0 for Saturday to 6 for Friday. The result is cross-checked against a count of days from 1 January 1970, a Thursday.

People use it to find the weekday they were born on, the day a historical event fell on, or where a future deadline lands. Apollo 11 landed on the Moon on 20 July 1969, and the congruence gives h = 1: a Sunday.

Dates before 15 October 1582 follow the Gregorian rules extended backwards. Records from those years usually use the Julian calendar, which gives a different weekday for the same written date.

حل شدہ مثالیں

Apollo 11 Moon landing

Date
1969-07-20
ہفتے کا دن
Sunday
ISO weekday number (Monday = 1)
7
Zeller's h (Saturday = 0)
1

جانچ کا ماخذ: ⁨NASA mission records (Sunday 20 July 1969); Python date(1969,7,20).weekday() = 6 (Sunday)⁩

Leap day 2000

Date
2000-02-29
ہفتے کا دن
Tuesday
Zeller's h (Saturday = 0)
3

جانچ کا ماخذ: ⁨Python 3.8: date(2000,2,29).weekday() = 1 (Tuesday); Zeller evaluated by hand with m = 14, Y = 1999⁩

First day of the Gregorian calendar

Date
1582-10-15
ہفتے کا دن
Friday
ISO weekday number (Monday = 1)
5

جانچ کا ماخذ: ⁨Inter gravissimas: Thursday 4 October 1582 (Julian) was followed by Friday 15 October 1582; Python date(1582,10,15).weekday() = 4⁩

Year 1, proleptic

Date
0001-01-01
ہفتے کا دن
Monday
Zeller's h (Saturday = 0)
2

جانچ کا ماخذ: ⁨Python 3.8: date(1,1,1).weekday() = 0 (Monday, proleptic Gregorian)⁩

سوالات

How can I work out the day of the week in my head?

Use John Conway's doomsday rule. In any year, 4 April, 6 June, 8 August, 10 October, 12 December, the last day of February, 9 May, 5 September, 11 July and 7 November share one weekday, the year's doomsday. In 2026 it is Saturday, so 12 December 2026 is a Saturday and 25 December, 13 days later, is a Friday.

Does a date fall on the same weekday every year?

No. A common year is 52 weeks and 1 day, so a date moves forward one weekday a year, or two when a 29 February comes between. A whole year's calendar usually repeats after 6, 11 or 28 years; 2026's is reused in 2037. The Gregorian calendar repeats exactly every 400 years, which are 146,097 days or 20,871 weeks.

Is Monday or Sunday the first day of the week?

It depends on the convention. ISO 8601 makes Monday day 1 and Sunday day 7, which is how the ISO weekday number here is counted. US calendars start on Sunday, and Excel's WEEKDAY function returns 1 for Sunday unless told otherwise. Zeller's own numbering starts at Saturday = 0, which is why the calculator shows it separately.

What happened to the weekdays when the calendar changed in 1582?

Nothing: the dates jumped, the weekdays did not. In Catholic countries Thursday 4 October 1582 in the Julian calendar was followed by Friday 15 October 1582 in the Gregorian calendar. Britain and its colonies changed in 1752, when Wednesday 2 September was followed by Thursday 14 September. For earlier dates, check which calendar a source uses before trusting a weekday.

“⁨Day of the week calculator⁩” کتنا درست ہے؟

درستی آپ کی درج کردہ قدروں اور طریقے کے مفروضوں پر منحصر ہے۔ اعشاری حساب 50 بامعنی ہندسے استعمال کرتا ہے، مگر تخمینے، عددی طریقے اور ماخذ کا ڈیٹا کم درست ہو سکتے ہیں؛ دکھائی گئی قدروں کو راؤنڈ کرنے سے یہ حدود ختم نہیں ہوتیں۔ آزاد ذرائع کی حل شدہ مثالوں سے جانچ: 5۔ مثلاً، “⁨Apollo 11 Moon landing⁩” کو ⁨NASA mission records (Sunday 20 July 1969); Python date(1969,7,20).weekday() = 6 (Sunday)⁩ سے جانچا جاتا ہے۔

اس طریقے کا ماخذ کیا ہے؟

Chr. Zeller, “Kalender-Formeln”, Acta Mathematica 9 (1887), 131–136; Howard Hinnant — weekday_from_days.

اس کیلکولیٹر کے بارے میں

h=(q+⌊13(m+1)5⌋+K+⌊K4⌋+⌊J4⌋+5J) mod 7h = \left(q + \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\right) \bmod 7

ماخذ

  1. Chr. Zeller, “Kalender-Formeln”, Acta Mathematica 9 (1887), 131–136
  2. Howard Hinnant — weekday_from_days

حوالوں سے جانچ شدہ

اس کیلکولیٹر میں آزاد ذرائع سے حاصل کردہ جوابات والی 5 حل شدہ مثالیں شامل ہیں۔ یہ ٹیسٹ مجموعے میں چلتی ہیں اور آپ انہیں یہاں بھی چلا سکتے ہیں۔

متعلقہ کیلکولیٹر