Date Calculator→Specialized Version
πŸ“…

Day of Week Calculator

Find day of week

Friday
Friday, August 30, 1996

Day of Week Calculator

Find what day of the week any date falls onβ€”past, present, or future. Perfect for planning events and historical curiosity.

Day of Week Examples

DateDay
July 4, 1776Thursday
July 20, 1969Sunday
Jan 1, 2000Saturday
Dec 25, 2024Wednesday

Implementation

``javascript function getDayOfWeek(year, month, day) { const date = new Date(year, month - 1, day); const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; return days[date.getDay()]; } `

Interesting Day Facts

  • The Gregorian calendar repeats every 400 years
  • Any date falls on each day of the week 58 times per 400 years
  • The 13th falls on Friday slightly more often than other days

Working Out the Day of the Week

The Gregorian calendar repeats exactly every 400 years β€” 146,097 days, which is divisible by 7. That means every date's weekday is fully determined, and the calendar for 2026 is identical to 1626.

Zeller's congruence computes it by hand:

` h = (q + ⌊13(m+1)/5βŒ‹ + K + ⌊K/4βŒ‹ + ⌊J/4βŒ‹ + 5J) mod 7 `

where q is the day, m the month (March = 3, and January and February count as months 13 and 14 of the *previous* year), K the year within the century, and J the century. The month offset exists because the Roman calendar started in March, which is also why September, October, November and December are named for seven, eight, nine and ten.

In code you would just use getDay() β€” 0 is Sunday β€” but the ISO 8601 convention counts Monday as 1 through Sunday as 7, and mixing the two conventions is a common source of off-by-one weekday bugs.

The Traps in Date Arithmetic

Months are not 30 days. Adding one month to 31 January has no correct answer, and every library picks differently β€” 28 February, 2 March or an error. Decide which your business needs before the edge case decides for you.

Days are not always 86,400 seconds. Daylight saving makes one day 23 hours and another 25. Adding n * 86400000 milliseconds drifts by an hour twice a year, which is enough to move a date across midnight and return an answer one day out.

`javascript // Correct β€” the Date object normalises overflow and handles DST const addDays = (date, days) => { const result = new Date(date); result.setDate(result.getDate() + days); return result; };

// Correct β€” calendar days, unaffected by DST or time of day const daysBetween = (a, b) => { const utc = (d) => Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()); return Math.round((utc(b) - utc(a)) / 86400000); }; `

Months are zero-indexed in JavaScript. new Date(2026, 0, 1) is January. new Date(2026, 12, 1) is January 2027, silently.

Parsing is not portable. new Date("2026-08-30") is parsed as UTC, while new Date("2026/08/30")` is parsed as local β€” the same calendar date, a day apart in some zones. Always parse ISO 8601, and construct with explicit components when the time matters.

Time Zones Decide the Answer

QuestionDepends on
How many days until an event?The viewer's zone
Is this subscription expired?UTC, always
What day of the week was this?The zone the event happened in
When does "tomorrow" start?The viewer's zone
Store timestamps in UTC and convert for display. Storing local times without an offset makes the data unrecoverable β€” you cannot tell later which zone it meant, and DST transitions make some local times ambiguous or non-existent.

Reference Points

IntervalDays
Week7
Month (average Gregorian)30.44
Quarter91.31
Year365.2425
Leap year366
The Gregorian rule β€” leap year every 4 years, except centuries, except every 400th β€” keeps the calendar within one day of the solar year for about 3,000 years.

Frequently Asked Questions

How do I find what day I was born on?

Enter your birth date and the calculator instantly shows the day of the week. You can find the day for any date in history or the future.

What day of the week will Christmas be?

Enter December 25 and any year to find out. Christmas 2024 falls on Wednesday, Christmas 2025 falls on Thursday.

How far back does this work?

The calculator works for any date in the Gregorian calendar (adopted 1582). For earlier dates, the Julian calendar was used, which had different leap year rules.

Related Tools

Explore other tools you might find useful:

More Date Calculator tools

You might also need