What does an ISO week date look like?
An ISO week date is a string of four parts: a week-numbering year, a week number, the literal letter W, and an optional weekday number. The extended form puts a hyphen between the year and the week number and between the week number and the weekday — 2026-W19-5. The basic form, intended for environments that cannot accommodate punctuation, omits both hyphens — 2026W195. Either form is valid; the extended form is what humans, internet protocols, and databases use almost universally.1
The week number runs from 01 through 52 in most years and through 53 in the long ones. It is always two digits with a leading zero: 2026-W04-1, not 2026-W4-1. The weekday is a single digit from 1 to 7, with Monday as 1 and Sunday as 7 — the standard's only numbering of the days of the week, and the one most computer-science conventions follow.1 A complete week without a weekday is also a valid form: 2026-W19 identifies a seven-day span without picking a particular day inside it, and is the form the HTML <input type="week"> control parses and produces.2
The internet's mainstream date-time profile, RFC 3339, does not require parsers to accept the week form, but it does carry the week productions in its informational grammar. The relevant rules — datespec-week and date-week — appear in Appendix A and reproduce the same shape: a four-digit year, the literal W, a two-digit week from 01 to 53, and a weekday digit from 1 to 7. Software that wants to interoperate over RFC 3339 channels should not assume week dates will round-trip, but a producer that emits them is on solid standards ground.4
How does ISO 8601 number the weeks?
The standard's rule is one sentence: week 1 of any ISO week-numbering year is the week containing the first Thursday of that year.1 Three equivalent statements appear in the standard and in textbooks built on it:
- The week containing 4 January. Whatever weekday 4 January is, the Monday-to-Sunday span containing it is week 1.
- The first week with a majority of its days — at least four of seven — in the new year.
- The week whose Monday falls in the seven-day window from 29 December of the previous calendar year through 4 January of the new one.
All four phrasings — Thursday, 4 January, four-day majority, Monday window — pick out the same week. The Thursday rule is the operationally useful one because Thursday is the middle of an ISO week, so a week is in the year in which most of its days lie. Earlier weeks (whose Thursday falls in late December) are numbered as the last week of the previous ISO year; later ones (whose Thursday falls in January) are week 1 of the new ISO year.1 The ISO 8601 standard sets this convention; the United States Federal Information Processing Standard for date interchange (FIPS PUB 4-1) adopted the same rule when it pulled the ISO 8601 calendar date and ordinal-date forms into US federal practice in 1991.5
The rule has the consequence that the ISO week-numbering year sometimes runs from late December of one Gregorian year through early January of the next. 2026-W01 begins on Monday 29 December 2025 and ends on Sunday 4 January 2026; 2025-W52 ends on Sunday 28 December 2025; there is no calendar gap between them. Conversely, 2027-W01 begins on Monday 4 January 2027, and 2026-W53 — the long week that exists because 2026 starts on a Thursday — covers Monday 28 December 2026 through Sunday 3 January 2027. Reading any week-numbered date in isolation requires the year that comes with it to be the ISO year, not the Gregorian one.1
Why does the ISO year sometimes differ from the calendar year?
An ISO week is a Monday-to-Sunday span, and a Gregorian year contains an irregular number of days that is rarely a multiple of seven. Some of the days at the edges of one year inevitably belong to a week that mostly lives in the other year, and the standard's rule about majority-of-days assigns those edge days to the neighbouring ISO year rather than splitting a week across two ISO years.1
The dates that drift are bounded. At the start of a calendar year, 1, 2, or 3 January can fall inside week 52 or 53 of the previous ISO year — but only when 1 January is a Friday, Saturday, or Sunday, because those are the cases where most of the surrounding week sits in the year before. At the end of a calendar year, 29, 30, or 31 December can fall inside week 01 of the next ISO year — but only when 31 December is a Monday, Tuesday, or Wednesday, because those are the cases where most of the surrounding week sits in the year after. So the deviation is at most three days at either boundary, and most days of the year always have ISO year and Gregorian year equal.1
The practical consequence is that any code that produces a week-numbered date must not pair a calendar year with an ISO week. The proposed JavaScript Temporal API names the trap directly: "the first few days of a calendar year may be part of the last week of the previous year, and the last few days of a calendar year may be part of the first week of the new year", and so a caller that wants to format a week-numbered date should read yearOfWeek alongside weekOfYear, not year.3 Spreadsheet software that exposes a "year of date" function and a "week number" function with no warning about the mismatch is a perennial source of bugs in business reporting at year boundaries.
Why do some years have 53 weeks?
Most ISO week-numbering years contain 52 weeks, which is 364 days — one day short of a common Gregorian year and two days short of a leap year. The drift accumulates, and roughly every five or six years a 53rd week is inserted to keep the ISO calendar aligned with the seasons.1 An ISO long year contains 53 weeks, which is 371 days, and the extra week is sometimes called a leap week by analogy with the leap day of the Gregorian calendar — though no day is added, only the week number 53 in front of dates that already exist.
The exact rule for which Gregorian years contain a 53rd ISO week falls out of the Thursday definition. A year has a 53rd ISO week if and only if it contains 53 Thursdays, which happens in any year that starts on a Thursday — leap or common — and in a leap year that starts on a Wednesday. (A common year of 365 days hits one weekday 53 times, the weekday on which 1 January falls. A leap year of 366 days hits two consecutive weekdays 53 times, the weekday on which 1 January falls and the next one along.)1
Recent and near-future 53-week years include 2004, 2009, 2015, 2020, and 2026. The next is 2032; then 2037, 2043, 2048, and 2054. Within any 400-year Gregorian cycle, exactly 71 years are 53-week years out of 400. The pattern is not periodic in any simple sense, because the Gregorian leap-year exceptions at century boundaries break the cycle, but the spacing is mostly five or six years with occasional eleven-year gaps.1
Where is the ISO week date used?
The ISO week date is the standard week-numbering convention in business and government across most of Europe. Manufacturing, logistics, and retail planning systems label production weeks with ISO week numbers — a printed phrase such as "Week 19, 2026" on a delivery schedule almost always means 2026-W19 as defined here. National railways, airlines, and the European Union institutions use ISO week numbers in their internal calendars, and the data layer for week numbering on every modern operating system has it built in.1
Inside that domain, the ISO week is also the foundation for the so-called 4-4-5 calendar used in retail and manufacturing accounting: a fiscal year is divided into four 13-week quarters, each composed of two four-week periods followed by a five-week period (or some variant), with a 53rd week inserted in long years. The variants — 4-4-5, 4-5-4, 5-4-4 — differ only in where the longer block sits inside the quarter. All of them rest on a uniform week numbering of the year, and ISO weeks are the conventional choice when the calendar has to interoperate with international supply chains.1
The week-number tool on this site computes the ISO week number and ISO week-numbering year for any date, alongside the date range of that week.
How does the ISO week date differ from US (locale) week numbers?
In the United States — and in several other locales — the conventional week starts on Sunday, not Monday, and week 1 is the week containing 1 January, not the week containing the first Thursday. The two rules disagree at almost every year boundary. Under the US convention, the first three days of January belong to week 1 of the new year regardless of which weekday they are; under ISO numbering, those same days can belong to week 52 or 53 of the previous year. A locale-aware "week of year" function will return different numbers for the same date depending on which convention the calling locale prefers.6
The Unicode Common Locale Data Repository, which the major operating systems and the JavaScript Intl API consume for locale rules, captures the difference as two separate properties: firstDay, the weekday a week starts on, and minDays, the minimum number of days in the new year required for a week to count as week 1. ISO 8601 corresponds to firstDay=Monday and minDays=4; US English to firstDay=Sunday and minDays=1; some Middle Eastern locales to firstDay=Saturday with minDays=1. The differences are not interchangeable: a producer that labels a week with one rule and a consumer that interprets it with another will be off by up to a week at year boundaries.6
An ISO week label has no acceptable ambiguity here. 2026-W01-1 means Monday 29 December 2025 under the ISO rule, full stop, and any consumer that interprets it as a US-style "first week of 2026" is producing the wrong date.1
What are the common pitfalls?
Most week-date bugs trace to a small set of patterns:
- Mixing the calendar year with the ISO week. Code that produces a week-numbered date by combining the Gregorian
yearwith the ISOweekOfYearwill be wrong by one for the few days at year boundaries where the two diverge. UseyearOfWeek(the ISO-week-aware year), notyear, when emitting a week-numbered date.3 - Confusing locale weeks with ISO weeks. A spreadsheet's
WEEKNUM(date, 1), a date library's locale-default%W, and a database'sWEEK()function each implement a different convention. ISO week numbers come out of the function only when the locale or mode argument explicitly selects ISO 8601 (in CLDR terms,firstDay=MondayandminDays=4).6 - Assuming week numbers stop at 52. A storage column sized for two digits can hold 53, but logic that branches on
weekNumber === 52as the last week of the year will mis-handle the long years. 2020, 2026, 2032, 2037, and 2043 are all 53-week years; code that has not been exercised against one tends to fall over the first time it sees one in production.1 - Round-tripping over RFC 3339. RFC 3339 carries the week grammar in its informational appendix but does not require receivers to accept it. A timestamp emitted as
2026-W19-5T09:00:00Zis a valid ISO 8601 string, but a consumer that follows RFC 3339 strictly may reject it. For wire formats, convert the week date to its calendar-date form (2026-05-08T09:00:00Z) before emission.4 - Treating the leading zero as optional. The standard requires the week number to be two digits —
W04, notW4. The HTML week-string grammar enforces this in browsers, and a parser that follows the standard will reject a one-digit week. Pad on emission.12 - Conflating "week of year" with "week of month". ISO 8601 defines only week-of-year; week-of-month is a separate, locale-defined concept that ISO 8601 does not specify. CLDR carries both, and a caller that asks for the wrong one will get a number in a different range.6
Frequently asked questions
Why is week 1 defined by Thursday and not by 1 January?
So that a week is in the year in which most of its days lie. Thursday is the middle of an ISO week, so the year that contains a week's Thursday is also the year that contains the majority of that week's seven days — the rule that produces a clean rule for which year a boundary week belongs to.1
Are ISO weeks numbered from W01 or from W1?
From W01. The week number is always two digits with a leading zero, even for weeks 1 through 9. The HTML week-string grammar in the WHATWG Living Standard rejects the unpadded form, and well-behaved parsers in language standard libraries do the same.12
What ISO week is 1 January in?
It depends on which weekday 1 January falls on. If 1 January is Monday, Tuesday, Wednesday, or Thursday, it is in week 01 of the new ISO year. If 1 January is Friday, Saturday, or Sunday, it is in the last week (52 or 53) of the previous ISO year. 2027-01-01 is a Friday, so it is 2026-W53-5; 2025-01-01 is a Wednesday, so it is 2025-W01-3.1
Is the ISO week date the same as the work week?
The ISO week date defines the numbering and the start of the week (Monday); it does not define the working week. The conventional Monday-to-Friday working week common in much of the world fits inside an ISO week as days 1–5, and weekends as days 6–7. Locales with different working weeks — Sunday-to-Thursday in parts of the Middle East, for example — number their working week against a different first-day convention; ISO numbering is independent of which days are working days.6
Can I parse an ISO week date in JavaScript?
Not with the legacy Date constructor, which accepts only the calendar-date and date-time forms of ISO 8601. The proposed Temporal API, currently in stage 3 and shipping behind flags in the major engines, exposes ISO weeks via weekOfYear and yearOfWeek on Temporal.PlainDate; the same API parses week-date strings via Temporal.PlainDate.from.3
How many ISO weeks are there in a 400-year Gregorian cycle?
400 Gregorian years contain 20,871 ISO weeks. Of the 400 ISO week-numbering years, 71 are long (53 weeks) and 329 are short (52 weeks): (71 × 53) + (329 × 52) = 20,871. The 71 long years are not evenly spaced — they occur most often five or six years apart, with occasional eleven-year gaps where the Gregorian century-leap-year exceptions break the pattern.1
Footnotes
- 1. ISO 8601-1:2019, Date and time — Representations for information interchange — Part 1: Basic rules , International Organization for Standardization (2019) — accessed 2026-05-09.
- 2. HTML Living Standard — 2.3.5.8 Weeks , WHATWG — accessed 2026-05-09.
- 3. Temporal.PlainDate — weekOfYear and yearOfWeek , TC39 — accessed 2026-05-09.
- 4. RFC 3339: Date and Time on the Internet: Timestamps , Internet Engineering Task Force (2002) — accessed 2026-05-09.
- 5. FIPS PUB 4-1: Representation of Calendar Date and Ordinal Date for Information Interchange , U.S. National Institute of Standards and Technology (1991) — accessed 2026-05-09.
- 6. Unicode Technical Standard #35: Locale Data Markup Language — Week Data , Unicode Consortium — accessed 2026-05-09.