Fact-checked by Grok 2 weeks ago

ISO week date

The ISO week date is a standardized method for representing dates as defined in ISO 8601-1:2019, utilizing a week-based where weeks begin on and are numbered from 01 to 53 within a designated year, formatted as YYYY-Www-D (with YYYY as the four-digit week year, Www as the two-digit week number prefixed by 'W', and D as the weekday from 1 for to 7 for ). This format ensures unambiguous of dates, particularly useful in computing, data exchange, and scheduling systems that prioritize weekly cycles over monthly ones. Key rules for week numbering specify that week 01 of a year is the first week containing at least four days of that year, which is equivalently the week that includes the year's first ; thus, it may start as early as the previous December 29 or as late as January 4. Most years have 52 weeks spanning 364 days, but a 53-week year spans 371 days (53 weeks × 7 days), ensuring the calendar aligns closely with the solar year while maintaining fixed seven-day weeks. The week year may differ from the year, as dates near year-end or start can belong to the adjacent week year—for instance, December 31, 2022 (a Saturday), falls in 2023-W01-6, as the first week of 2023 begins on December 26, 2022. This system contrasts with traditional calendar dates (YYYY-MM-DD) by emphasizing weeks as the primary unit, reducing ambiguity in cross-cultural contexts where week starts vary (e.g., Sunday in some regions versus Monday in ISO). Adopted widely in standards like and programming libraries (e.g., Python's datetime module), the ISO week date facilitates precise temporal calculations, such as fiscal reporting or , without reliance on locale-specific month lengths. Extensions in ISO 8601-2:2019 allow for durations and intervals in week terms, enhancing its utility for recurring events.

Fundamentals

Definition

The ISO week date is a convention for representing dates using the week-numbering year, a week number from 01 to 53, and a weekday number from 1 to 7, with assigned the value 1 and 7. This , denoted as YYYY-Www-D, facilitates unambiguous identification of dates in a week-based structure. Defined within the international standard, the ISO week date system was first published in 1988 to establish a uniform method for the representation of dates and times in data interchange, minimizing confusion across different cultural and regional conventions. The standard was revised in 2000, again in 2004, and in 2019 (when it was split into ISO 8601-1 and ISO 8601-2) to refine its specifications, including enhancements to the week date components for greater clarity and applicability in computing and communication systems. A fundamental principle of the ISO week date is that all weeks commence on , and the designated year—the week-year—may occasionally diverge from the corresponding year, particularly for dates near year boundaries. For instance, 2023-W01-1 denotes January 2, 2023, which is the first within the 2023 week-year. This approach prioritizes the continuity of complete seven-day weeks over strict alignment with calendar year starts or ends.

Date Format

The ISO week date format, as defined in ISO 8601-1:2019, represents a specific by combining the week-year (YYYY), the week number prefixed by 'W' (Www), and the day of the week (D). The extended format uses hyphens as separators: YYYY-Www-D, where YYYY is the four-digit week-year, ww is the two-digit week number (padded with a if necessary), and D is the one-digit weekday (1 for through 7 for ). For example, 2025-W45-3 denotes in week 45 of the 2025 week-year. An alternative basic format omits the hyphens for compactness: YYYYWwwD. In this notation, the same date as above would be written as 2025W453. Both formats adhere to the principle of big-endian ordering, starting with the largest unit (year) and proceeding to the smallest (day). The week number ww ranges from 01 to 53, and the day D from 1 to 7, but not all combinations are valid since most years have only 52 weeks, making certain week 53 designations invalid for those years. Week 53 occurs only in years with 53 weeks, typically when the year starts or ends on a Thursday. For instance, in the 1976 week-year, which has 53 weeks, 1976-W53-7 corresponds to December 31, 1976, illustrating how week 53 can align with the final days of the year. Year transitions are handled by assigning dates to the week-year that contains the majority of their days, ensuring continuity across boundaries.

Basic Rules

In the ISO week date system, weeks always begin on and end on , with weekdays numbered from 1 () to 7 (). This numbering ensures a consistent seven-day structure aligned with international business practices. A day is assigned to the ISO week that contains its , meaning the week spans from the to the including that . The first week (W01) of a given week-year is the one that includes the first of the corresponding year, guaranteeing at least four days of the new year in that initial week. The week-year may differ from the year due to these alignments, particularly at year boundaries. Days before the first in belong to the previous week-year's final week, while days after the last in belong to the next week-year's first week. For instance, , 2012 (), falls in the first week of the 2013 week-year as 2013-W01-1, since it is the of the week containing the first of 2013 (). This distinction between week-year and calendar year prevents split weeks and maintains the integrity of full seven-day periods. The ISO week date is typically notated as YYYY-Www-D, where YYYY is the week-year, ww is the two-digit week number (01-53), and D is the weekday (1-7).

Relation to the Gregorian Calendar

Week Boundaries

In the ISO week date system, defined by ISO 8601-1:2019, the first week of a week-year (week 01) is the week containing the first of the corresponding year. This rule ensures that week 01 always includes at least four days—Monday through —in the new year. Equivalently, week 01 is the week that contains of the year, as this date invariably falls within the first ISO week. The week begins on the of that period, aligning with the standard that all ISO weeks start on . For example, in , January 1 is a Wednesday, making January 2 the first of the year. Therefore, -W01 runs from , December 30, 2024, to , January 5, , with the first three days belonging to the previous week-year. The last week of an ISO week-year, either week 52 or 53, concludes on the preceding the that initiates week 01 of the subsequent week-year. This boundary ensures continuity across week-years without overlap or gap. An ISO week-year spans 52 weeks in most cases but extends to 53 weeks when the Gregorian year includes 53 s, a configuration that occurs approximately 17.75% of the time and is more frequent in leap years due to the additional day affecting weekday alignment.

Weeks per Year

In the ISO week date system, most week-years contain 52 full weeks, totaling 364 days, though some extend to 53 weeks, encompassing 371 days. This variation arises because the year has 365 or 366 days, which do not align perfectly with multiples of 7-day weeks; an extra week is included when the week-year boundaries capture an additional . A week-year has 53 weeks if it begins on a Thursday in a or on a Wednesday in a , ensuring the inclusion of the leap week (the 53rd). These 53-week years occur approximately every 5 to 6 years, with a of about 17.75% over the long term, influenced by the leap year cycle and the 400-year rule. For instance, the week-year starts on a Thursday (December 29, 2025, to January 4, 2026, as week 1) and includes 53 weeks. The from the provides a quick method to identify potential 53-week years by calculating the weekday for key dates like , allowing verification of the starting condition without full calendars. In and fiscal contexts, 53-week years impact under 52-53 week fiscal calendars, which often align with ISO week numbering for consistent weekly periods; the extra week can shift quarterly alignments and complicate year-over-year financial comparisons, requiring adjustments in budgeting and tax planning.

Weeks per Month

In the ISO week date system, months exhibit variable distribution of weeks due to the fixed Monday-starting weeks that frequently cross month boundaries, resulting in months spanning 4 to 6 distinct ISO weeks. This variability arises from the combination of month lengths (28 to 31 days) and the alignment of the first of the year, which determines week 1 and influences edge months. Patterns in this distribution show that mid-year months like , with 31 days, often contain more full weeks, while shorter months like typically span fewer, around 4 weeks. and , as edge months, commonly include partial weeks from the adjacent year; for instance, 2025 encompasses parts of five ISO weeks—2025-W01 (starting December 30, 2024) through 2025-W05 (extending to February 2, 2025)—with only three full weeks entirely within the month. Over the long term, the average number of ISO weeks per Gregorian month is approximately 4.35, derived from the calendar's mean annual length of 365.2425 days divided by 7 days per week and then by 12 months. This irregular alignment complicates monthly week-based scheduling and reporting, as partial weeks disrupt consistent planning across fiscal or operational periods that blend monthly and weekly views.

Fixed Week Dates

In the ISO week date system, certain dates serve as reliable anchors because they consistently belong to the same designated week number each year, facilitating quick orientation in perpetual calendars and almanacs without requiring complex computations. January 4 is always part of week 01, regardless of the starting day of the year. This invariance stems directly from the definition of week 01 as the week containing the year's first , which equivalently ensures inclusion of since the possible positions of that Monday-starting week place it between December 29 of the prior year and . The weekday position of within week 01 varies from (day 1) to (day 7), depending on the configuration. Symmetrically, December 28 always falls in the final week of the ISO year, which is either week 52 or 53. According to the ISO 8601 standard, this results from the last week's definition as the one containing the year's final Thursday, equivalently encompassing December 28 to guarantee at least four days in the year. Like January 4, its weekday position in that week ranges from 1 to 7. These two dates provide up to seven fixed reference points annually when considering their potential weekday alignments across the week's structure, enabling users to anchor and extend week numbering forward or backward for practical reference in scheduling and fiscal planning.

Equal Weeks

In the ISO week date system, equal weeks refer to those that encompass the identical set of Gregorian calendar dates—specifically, the same month and day numbers from December 28 to January 3—but are designated as part of different ISO week-years. These weeks always begin on a Monday and end on a Sunday, spanning the year-end boundary, and arise exclusively in years with 53 weeks, where the additional week aligns December 28 as the starting Monday. A prominent example is ISO week 53 of 2015, which ran from December 28, 2015 (Monday) to January 3, 2016 (Sunday). This exact same Gregorian date range—December 28 through 31 followed by January 1 through 3—reappeared as ISO week 53 of 2020, from December 28, 2020 () to January 3, 2021 (). Such alignments occur under specific conditions tied to the calendar's cycle and starting weekday: common years beginning on , or beginning on , both resulting in 53 weeks and positioning December 28 as for the final week. In contrast, other 53-week configurations produce different but recurring date spans for their 53rd week. For instance, starting on , such as 2004, feature week 53 from December 27, 2004 (Monday) to January 2, 2005 (Sunday), repeating this pattern in similarly configured future years. These equal weeks are relatively rare, appearing in the approximately 17.75% of years that have 53 weeks, which happens roughly every 5 to 6 years on average due to the 7-day week cycle against the 365- or 366-day year. This phenomenon aids in long-term datasets, such as financial reporting or epidemiological tracking, where recurring year-end date clusters allow consistent aggregation without adjusting for varying week counts. Unlike fixed week dates, which anchor individual days (e.g., all Mondays) to consistent positions within the ISO structure, equal weeks emphasize the full 7-day sequence matching across years, providing a broader temporal .

Advantages and Applications

Key Benefits

The ISO week date system establishes a standardized approach to week numbering by defining all weeks to begin on and consist of exactly seven days, thereby minimizing ambiguity in communications, transactions, and interchange. This facilitates seamless global , as it eliminates variations arising from differing national conventions on week starts and boundaries. A key advantage lies in its simplicity for week-based calculations, as no week is split across months or years—each fully belongs to a single . This structure simplifies processes such as computation, scheduling, and development of ISO-compliant software, where precise week aggregation is essential for accuracy and efficiency. Furthermore, the Monday-start convention aligns closely with prevalent workweek patterns in many regions, supporting a typical five-day cycle from to followed by a weekend. Historically, the system was formalized in :1988 to supersede disparate earlier standards and national practices, thereby enhancing worldwide interoperability in commerce, administration, and technology since its adoption.

Practical Uses

In , ISO week dates facilitate the structuring of fiscal quarters around complete weeks, such as the common 13-week quarters used in and for consistent financial and budgeting. Retail inventory cycles frequently align with ISO week-based calendars, like the 4-5-4 or 4-4-5 systems, to synchronize stock management, sales forecasting, and promotional planning across fixed seven-day periods without partial weeks disrupting metrics. In and programming, ISO week dates are implemented through standard libraries to handle temporal data accurately; for instance, Python's datetime includes the isocalendar() , which returns the ISO year, week number, and weekday for any given date, enabling reliable week-based aggregations in and scheduling applications. Database systems adhere to ISO week numbering for timestamps to support interoperable queries and reporting. ISO week dates underpin international standards for data exchange, particularly in (EDI) via UN/, where elements like 2379 specify calendar week days in a year-week-day format with weeks starting on (though week numbering differs from by defining week 01 as the first week of ) for standardized business documents. In , this format appears in shipping manifests and documentation to denote delivery weeks unambiguously across borders, while the incorporates through its harmonized standard EN for regulatory compliance in trade and administrative processes. Practical examples include Excel's WEEKNUM function with return_type=21, which computes ISO week numbers to align spreadsheets with international fiscal reporting. Similarly, global application APIs, such as those following RESTful design principles, employ ISO week date notation (e.g., YYYY-Www) for endpoints handling scheduling or , ensuring chronological and cross-timezone in distributed systems.

Comparisons with Other Systems

Differences from Gregorian Week Numbering

The ISO week date system, defined by , diverges from traditional week numbering primarily in the definition of the week's starting day and the assignment of weeks to calendar years. In the ISO system, weeks begin on and are numbered from 1 to 52 or 53, with the first week of the year being the one that includes the first of (or equivalently, contains at least four days of the new year). By contrast, many implementations of week numbering, such as in the United States, start weeks on , and the numbering often ties directly to the calendar year without adjusting for partial weeks at the boundaries. A key difference lies in year assignment: the ISO week-year is the Gregorian year containing the Thursday of that week, which can cause dates in late December or early January to belong to a different year than their Gregorian date. For instance, if December 29 to December 31 falls on a Monday to Wednesday, those days are assigned to week 1 of the following ISO year, even though they are part of the prior Gregorian year ending December 31. In standard Gregorian week numbering, all dates from January 1 to December 31 are confined to that calendar year, with week 1 typically starting from or near January 1, potentially resulting in partial weeks at the beginning or end of the year. Specific examples illustrate these shifts. December 31, 2000, a Sunday, falls on the seventh day of week 52 in ISO year 2000 (2000-W52-7), aligning with the year. However, , 2019, a , is the first day of week 1 in ISO year 2020 (2020-W1-1), despite being the 364th day of Gregorian 2019. In Gregorian numbering, , 2019, would be near the end of week 52 of 2019, fixed to that year. These differences can lead to in or mixed systems, such as or software applications, where a like December 31 might be interpreted as belonging to one year in ISO but another in local conventions, potentially causing errors in week-based aggregations. The ISO approach mitigates certain issues inherent in numbering, such as the absence of a "week 0" or "week 54," by ensuring all weeks are fully contained within 1 to 53 and aligned to whole weeks without partial orphans at year ends.

Other Week Numbering Systems

The Julian Day Number (JDN) provides a continuous, uninterrupted count of days originating from noon on January 1, 4713 BCE (), facilitating precise chronological calculations in astronomy without reliance on calendar discontinuities like month or year boundaries. This system enables the derivation of week numbers through integer division of the by 7, yielding a sequential week count extending backward and forward indefinitely from the , while the remainder ( 7) identifies the day within the week, with conventions typically assigning 0 to and progressing to 6 for . For instance, the first day of ISO week 2025-01 (, December 30, 2024) corresponds to 2460675, placing it in week number 351,525 from the Julian (exactly divisible by 7), and 7 yields 0, confirming under the standard astronomical mapping. In the United States, fiscal week numbering systems, particularly prevalent in and , diverge from -based weeks by prioritizing consistent quarterly reporting through structures like the 4-4-5 adopted by the (NRF). This framework divides the into four quarters of exactly 13 weeks each (totaling 52 weeks, with a 53rd week inserted every five to six years to align with the 365- or 366-day solar year), where each quarter comprises three fiscal "months": two of 4 weeks and one of 5 weeks, often starting weeks on to match shopping patterns. Weeks are numbered sequentially from 1 to 52 (or 53) within the , which typically begins the nearest (late or early ), ensuring even quarters have balanced durations for comparisons; for example, in a 53-week fiscal 2025 under NRF guidelines, the extra week is added to the fourth quarter to maintain quarterly equivalence without shifting prior periods. Variants of ISO 8601-inspired week numbering exist in North American contexts, where weeks often commence on Sunday rather than Monday, adapting the sequential numbering to align with local conventions while retaining the principle of a year starting with the week containing . In such systems, week 1 is the first week with at least one day in the (or a majority, depending on the implementation), leading to potential offsets from the ISO scheme; for instance, software like uses a Sunday-start variant where the week number for a given date follows a 1-based count from , differing from ISO by up to one week in boundary cases. Historical alternatives include the French Revolutionary calendar (1793–1805), which replaced the seven-day week with the décade, a 10-day cycle divided into three phases per 30-day month, eliminating traditional weekly numbering in favor of a decimal-based structure to symbolize rational reform. Each décade culminated in a rest day (décadi), with days named sequentially (primidi for the first, duodi for the second, up to décadi), and the year structured around 12 months plus five or six complementary days, resulting in no fixed seven-day weeks but a continuous 10-day for civil and purposes.

Algorithms

Week Number from Ordinal Date

The ISO week number from a ordinal date, consisting of a year Y and day of the year D (ranging from 1 to 365 or 366), is determined by aligning D with the start of the first ISO week, which is defined as the week containing of year Y. This adjustment accounts for the Thursday rule, ensuring that always falls within week 1 of the ISO year. The process begins by identifying the position of (ordinal day 4) and computing an offset based on its weekday to locate the Monday that begins the first week. To compute the offset, first determine the weekday of in year Y, denoted as w (where = 1, = 2, ..., = 7). The offset to the first Monday is then $4 - ((w - 1) \mod 7), which may yield a value between -2 and 4. This offset represents the day-of-year position of the Monday starting ISO week 1 relative to January 1. If the offset is positive and greater than 1, early days in belong to the previous ISO year; if negative, the ISO year begins before January 1, incorporating late days from the prior year into week 1 of Y. The provisional week number is calculated using the formula: \text{week} = \left\lfloor \frac{D - \text{offset}}{7} \right\rfloor + 1 where D is the day of the year and offset is as defined above. This formula measures complete weeks from the first Monday. Boundary handling is essential: if the computed week is 0 (typically for D < 4 when the first Thursday falls after January 4), the date belongs to the previous ISO year, and the week number is 52 or 53 depending on whether the previous year has 53 weeks (determined by checking if December 31 of Y-1 falls in a week starting in Y-1). Conversely, for late-year dates ( D > 360 in non-leap years or > 361 in leap years), if the computed week exceeds 52 or 53 and the week containing the date has its Thursday in the next Gregorian year, the date shifts to week 1 of the next ISO year. 53-week years occur in about 18% of years (71 out of 400), specifically when the Gregorian year starts or ends such that the total spans an extra week. Pseudocode for the core logic, assuming a function to compute the weekday of January 4:
function isoWeekFromOrdinal(Y, D):
    w = weekdayOfDate(Y, 1, 4)  // 1=Monday to 7=Sunday
    offset = 4 - ((w - 1) % 7)
    provisional_week = floor((D - offset) / 7) + 1
    iso_year = Y
    
    if provisional_week < 1:
        // Early days: shift to previous year
        iso_year = Y - 1
        // Compute weeks in previous year (52 or 53)
        prev_w = weekdayOfDate(Y-1, 12, 31)
        has_53_weeks = (prev_w == 4 or prev_w == 5)  // Thursday or Friday for Dec 31
        provisional_week = (has_53_weeks ? 53 : 52) + provisional_week  // Adjust to last week
    elif provisional_week > 53:
        // Late days: check spill to next year
        next_offset = 4 - ((weekdayOfDate(Y+1, 1, 4) - 1) % 7)
        days_in_year = 365 + (isLeap(Y) ? 1 : 0)
        if D > days_in_year - next_offset + 1:
            iso_year = Y + 1
            provisional_week = 1
        else:
            // Clamp to 52 or 53 based on year length
            curr_w = weekdayOfDate(Y, 12, 31)
            has_53_weeks = (curr_w == 4 or curr_w == 5)
            provisional_week = min(provisional_week, has_53_weeks ? 53 : 52)
    
    return (iso_year, provisional_week)
This handles year shifts by boundary conditions near (days 1–3) and December (days ~361–366), ensuring the rule is respected. weekdays requires a separate , such as approximating the number for year Y, month 1, day 1, then deriving w = (( \text{julian_day} + 1 ) \mod 7) + \text{adjustment} for the . For example, consider the ordinal date 2025-1 (, 2025, a Wednesday). The weekday of , 2025 (a , w = 6) gives offset = 4 - (5 % 7) = 4 - 5 = -1. Then, provisional_week = \lfloor (1 - (-1)) / 7 \rfloor + 1 = \lfloor 2 / 7 \rfloor + 1 = 0 + 1 = 1, with ISO year 2025 (no shift needed, as the first week starts December 30, 2024, but belongs to 2025 due to containing ). Thus, it is 2025-W1. In contrast, for cases like , 2023 (a ), the offset leads to provisional_week = 0, shifting to 2022-W52.

Week Number from Calendar Date

To derive the ISO week number from a date consisting of year, month, and day, the process begins by computing the ordinal date, or day of the year, which represents the cumulative number of days elapsed since of that year. This ordinal date serves as an intermediate step before applying the week from the ordinal date, as detailed in the preceding on algorithms. The approach ensures compatibility with the standard's definition of weeks, where the week number aligns with the year containing the majority of the week or specifically the of that week. The ordinal date is obtained by adding the day of the month to the total number of days in all preceding months within the year. The days in preceding months are determined using a fixed array of month lengths under the Gregorian calendar: (31), (28 or 29 in leap years), (31), (30), May (31), June (30), July (31), August (31), September (30), October (31), and November (30). This yields the following cumulative days to the start of each month in non-leap years:
MonthCumulative Days (Non-Leap)
January0
February31
March59
April90
May120
June151
July181
August212
September243
October273
November304
December334
The ordinal date is then calculated as the cumulative value for the given month plus the day. Leap years require an adjustment: if the year is a and the month is after (i.e., month > 2), add 1 to the cumulative days before adding the day to account for the extra day in . A year is a in the if it is divisible by 4, but not by 100 unless also divisible by 400. This adjustment ensures the ordinal date correctly reflects the position within the 366-day year. Once the ordinal date is determined, the ISO week number and associated year are computed using the ordinal-based , which incorporates the weekday of the date to identify the Monday-starting week containing the ISO . Dates near year boundaries, particularly through 31, may belong to the following year's week 1 if the majority of that week (including its ) falls in the next year, or to the previous year's week 52 or 53 otherwise. Similarly, through 3 may fall into the previous year's final week. For instance, January 1, 2017 (month 1, day 1; non-leap year, ordinal date 1) results in ISO week 52 of , as this date falls in the week starting December 26, 2016 (with on December 29, 2016). Another example is December 31, 2009 (month 12, day 31; non-leap year, ordinal date 365), which yields ISO week 53 of 2009, since 2009 contained 53 weeks due to starting on a , and falls in the final week with its on itself.

Calendar Date from Week Number

To convert an ISO week date, specified as the ISO year Y, week number W (ranging from 01 to 53), and weekday D (1 for Monday to 7 for Sunday), to a corresponding date (calendar year, month, and day), the process involves calculating an intermediate ordinal day number relative to of year Y, adjusting for potential year boundary crossings, and then mapping the ordinal to the month and day within the appropriate calendar year. This algorithm relies on the definition that week 01 of the ISO year Y is the week containing of Y, with its falling between and of Y. The first step is to determine the weekday of January 4 in year Y using adapted for the , which provides a mathematical formula to compute the day of the week for any date. For (m=13, year adjusted to y = Y-1, day q=4), let K = (Y-1) \mod 100 and J = \lfloor (Y-1)/100 \rfloor. The is given by h \equiv 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 \pmod{7}, where h = 0 corresponds to Saturday, 1 to Sunday, ..., 6 to Friday. The ISO weekday d (1=Monday, ..., 7=Sunday) is then d = ((h + 5) \mod 7) + 1. This yields the position of January 4 within its week. Next, compute the ordinal day number (1 for January 1) of the Thursday (day 4) in week 01 relative to January 1 of Y: \text{ordinal}_{\text{Thu, W01}} = 8 - d. The ordinal day number for the target date Y-W-D relative to January 1 of Y is \text{ordinal} = \text{ordinal}_{\text{Thu, W01}} + 7(W - 1) + (D - 4). This formula adds the weeks from week 01 to week W (shifting to the Thursday of week W) and then adjusts from Thursday to the target weekday D. If \text{ordinal} \geq 1 and \text{ordinal} \leq 365 (or 366 if Y is a leap year, determined by Y \mod 4 = 0 and not a century year unless Y \mod 400 = 0), the calendar year is Y. If \text{ordinal} < 1, the date falls in the previous year (Y-1), and the adjusted ordinal is \text{ordinal} + number of days in Y-1 (365 or 366). If \text{ordinal} > 365 (or 366), it falls in the next year (Y+1), with adjusted ordinal \text{ordinal} - days in Y. Year shifts occur for early weeks in years starting mid-week (e.g., week 01 spilling into December of the prior year) or late weeks in years ending mid-week. To convert the final ordinal \text{ordinal}' in calendar year C to month and day, compare against cumulative days from , accounting for if applicable:
MonthCumulative Days (Non-Leap)Cumulative Days (Leap)
3131
5960
9091
120121
May151152
181182
July212213
August243244
September273274
October304305
November334335
December365366
Find the smallest month M where cumulative days to end of M \geq \text{ordinal}', then day = \text{ordinal}' - cumulative to end of M-1. For example, in a non-leap year, ordinal 32 falls in (day 32 - 31 = 1). Consider the example of 2025-W01-1. Year 2025 is non-leap. January 4, 2025, is a (d=6), so \text{ordinal}_{\text{Thu, W01}} = 8 - 6 = 2 (January 2). Then, \text{ordinal} = 2 + 7(1-1) + (1-4) = -1. Since negative, shift to 2024 (leap, 366 days): \text{ordinal}' = -1 + 366 = 365. Cumulative to November 30 is 335, to December 31 is 366, so month=, day=365 - 335 = 30. Thus, December 30, 2024. This illustrates a year shift for the of 2025's week 01.

References

  1. [1]
    ISO 8601-1:2019 - Date and time — Representations for information ...
    This document specifies representations of dates of the Gregorian calendar and times based on the 24-hour clock, as well as composite elements of them.
  2. [2]
    ISO 8601 — Date and time format
    Feb 21, 2017 · ISO 8601 is an unambiguous, internationally understood format for dates and times, using YYYY-MM-DD for dates and year, month, day, hour, ...ISO 8601-1:2019 · ISO 8601-2:2019 · Date and time: the new draft of...
  3. [3]
    ISO 8601-2:2019 - Date and time — Representations for information ...
    In stockThis document specifies additional representations of dates of the Gregorian calendar and times based on the 24-hour clock that extend the basic rules and ...<|control11|><|separator|>
  4. [4]
    ISO 8601:2004
    ### Summary of ISO Week Date from ISO 8601-1:2019 (via ISO 8601:2004)
  5. [5]
    A summary of the international standard date and time notation
    International Standard ISO 8601 specifies numeric representations of date and time. This standard notation helps to avoid confusion in international ...
  6. [6]
    ISO 8601:1988 - Data elements and interchange formats
    Status. : Withdrawn ; Publication date. : 1988-06 ; Stage. : Withdrawal of International Standard [95.99] ; Edition. : 1 ; Number of pages. : 14.Missing: history | Show results with:history
  7. [7]
    ISO 8601:2000 - Data elements and interchange formats
    Publication date. : 2000-12 ; Stage. : Withdrawal of International Standard [95.99] ; Edition. : 2 ; Number of pages. : 29 ; Technical Committee : ISO/TC 154.
  8. [8]
    Week Numbers for 2023 - Epoch Converter
    Please note that there are multiple systems for week numbering, this is the ISO week date ... 1, 2023. Week 01, Jan. 2, 2023, Jan. 8, 2023. Week 02, Jan. 9, 2023 ...
  9. [9]
    How Do Week Numbers Work? - Time and Date
    The most common is the International Standard ISO 8601, where Monday is the first day of the week followed by Tuesday, Wednesday, Thursday, Friday, Saturday, ...
  10. [10]
    International standard date and time notation
    ISO 8601 is only specifying numeric notations and does not cover dates and times where words are used in the representation. It is not intended as a replacement ...<|control11|><|separator|>
  11. [11]
    Date-time (ISO 8601) support in Allegro CL - Franz Inc.
    A Week date is written as YYYY-Www-D (extended) or YYYYWwwD (basic). YYYY indicates a year, ww indicates a week number (01 through 53 -- the W is the letter W), ...<|control11|><|separator|>
  12. [12]
    ISO Week In SQL Server - LessThanDot
    Sep 22, 2008 · ... ISO year number is always equal to the calendar year number. Examples: 2008-12-29 is written “2009-W01-1”; 2010-01-03 is written “2009-W53-7”.
  13. [13]
    [PDF] ISO 8601 - rule for defining weeknumbers - Brepols
    The ISO 8601 rule is: The first week of the year is the week containing the first Thursday. In other words:
  14. [14]
    Week Number Calculator: What Week of the Year Is It?
    ### ISO Week Number for December 31, 2023
  15. [15]
    What Is ISO 8601? - Time and Date
    ISO 8601 assigns a number to each week of the year. Week numbers are widely ... Week 1 is defined as the week that contains the first Thursday of the year.Missing: rule | Show results with:rule
  16. [16]
    Week 1 2025: dates, calendar and weekly schedule to print
    Week 1 2025: Monday, December 30, 2024 - Sunday, January 5, 2025. Dates to consult and weekly calendar of week 1 to print to organize your schedule.
  17. [17]
    The Mathematics of the ISO 8601 Calendar - Long and Short Years
    ISO years have 52 or 53 weeks. Long years (53 weeks) occur 17.75% of the time, short years (52 weeks) 82.25%. A year is long if f(y) modulo 28 < 5.
  18. [18]
    What is ISO 8601?
    The week in the ISO calendar is defined as seven calendar days starting with a Monday. The DI Solution and MS Excel weeks start with a Sunday. The numbering of ...
  19. [19]
    Week Numbers for 2026 - Epoch Converter
    This page lists all weeks in 2026. There are 53 weeks in 2026. All weeks are starting on Monday and ending on Sunday.
  20. [20]
    Tax years | Internal Revenue Service
    Aug 13, 2025 · A 52-53-week tax year is a fiscal tax year that varies from 52 to 53 weeks but does not have to end on the last day of a month.
  21. [21]
    Week Numbers for 2025 - Epoch Converter
    This page lists all weeks in 2025. There are 52 weeks in 2025. All weeks are starting on Monday and ending on Sunday.What's the Current Week... · 2024 · 2026
  22. [22]
    Calendar Calculations
    The average length of the year becomes (291 x 366 + 909 x 365)/1,200 = 365.2425 days, with an error of 365.2425 - 365.2422 = 0.0003 days per year, or one day ...
  23. [23]
    Difference Between Standard Gregorian and ISO-8601 - Vizney
    Oct 11, 2024 · This section explains the differences between the Standard Gregorian and the ISO-8601 Week-Based in date calculations.
  24. [24]
    WeekNum and ISOWeekNum functions - Power Platform
    Examples ; Saturday, December 25, 2021, 52, 51 ; Sunday, December 26, 2021, 53, 51 ; Monday, December 27, 2021, 53, 52 ; Tuesday, December 28, 2021, 53, 52 ...
  25. [25]
    ISO Calendar week 2020-53 wrongly not accepted - Drupal
    Jun 18, 2019 · ... December 28 YYYY ... In ISO-8601 specification, it says that December 28th is always in the last week of its year.
  26. [26]
    ISO-8601 Week-Based Calendar - Tableau Help
    The ISO-8601 calendar is an international standard dividing dates into years, quarters, weeks, and weekdays. Weeks have 7 days, starting on Monday, and years ...Differences between ISO-8601... · Date Functions that support...
  27. [27]
    ISO 8601 week dates - Derick Rethans
    Sep 24, 2013 · Week numbers are defined in this same ISO 8601 standard. Each year has 52 or 53 weeks and weeks always start on a Monday.
  28. [28]
    Week Numbers for 2021 - Epoch Converter
    Week Numbers for 2021 ; Week 53, 2020, Dec. 28, 2020, Jan. 3, 2021 ; Week 01, Jan. 4, 2021, Jan. 10, 2021 ; Week 02, Jan. 11, 2021, Jan. 17, 2021 ; Week 03, Jan. 18 ...
  29. [29]
    Week Numbers 2004 - Date Calculator
    December 13, 2004, December 19, 2004. 52, December 20, 2004, December 26, 2004. 53, December 27, 2004, January 2, 2005. Week Numbers with ISO 8601 Date Format.
  30. [30]
    Years, Leap Years, Number of Days and Weeks in a Year
    ISO weeks: Number of weeks according to ISO-8601 (weeks starting on Monday). ... Year III. 2060, 366, 53, Yes, Year IV. 2061, 365, 52, Year I. 2062, 365, 52, Year ...
  31. [31]
    Introduction to the new ISO 8601-1 and ISO 8601-2 - ISO/TC 154
    Aug 26, 2019 · ISO 8601-1:2019 and ISO 8601-2:2019 have been published simultaneously in March 26 2019, as successors of the widely successful ISO 8601:2004.
  32. [32]
    Common Types of Fiscal Years | Indeed.com
    Jun 6, 2025 · The ISO year, or ISO week-numbering year, consists of 52 or 53 full weeks and has no months. Governments and businesses often employ this ...
  33. [33]
    Retail Calendar Guide 2025: 4-5-4 vs 4-4-5 Calendar Systems ...
    Oct 8, 2025 · A retail calendar is a fiscal calendar system that divides the year into periods based on complete weeks rather than traditional calendar months ...
  34. [34]
    datetime — Basic date and time types — Python 3.14.0 documentation
    Return a datetime corresponding to the ISO calendar date specified by year, week and day. The non-date components of the datetime are populated with their ...Datetime -- Basic Date And... · Timedelta Objects · Datetime Objects
  35. [35]
    ISO 8601 Date, Time, and Duration Support - Oracle Help Center
    International Standards Organization (ISO) standard 8601 describes an internationally accepted way to represent dates, times, and durations.
  36. [36]
    UN/EDIFACT Data Element 2379 Release: D.00B - UNECE
    103 YYWWD Calendar week day: Y = Year ; W = Week ; D = Day Week number 01 is always first week of January Day number 1 is always Monday.
  37. [37]
    WEEKNUM function - Microsoft Support
    Returns the week number of a specific date. For example, the week containing January 1 is the first week of the year, and is numbered week 1.
  38. [38]
    The 5 laws of API dates and times
    Mar 20, 2013 · ISO 8601 also allows us the flexibility to provide a date without a time. In scenarios in which time is not important, only the date ...
  39. [39]
    Mathematics of the ISO 8601 Calendar - webspace.science.uu.nl
    ... ISO calendar year has 53 weeks. The ISO week number of an arbitrary date and the day number in that week can be determined from several online calendar ...
  40. [40]
    Week Numbers for 2000 - Epoch Converter
    This page lists all weeks in 2000. There are 52 weeks in 2000. All weeks are starting on Monday and ending on Sunday.
  41. [41]
    Week Numbers for 2019 - Epoch Converter
    This page lists all weeks in 2019. There are 52 weeks in 2019. All weeks are starting on Monday and ending on Sunday.
  42. [42]
    Julian Date Converter
    Julian dates (abbreviated JD) are simply a continuous count of days and fractions since noon Universal Time on January 1, 4713 BC (on the Julian calendar).Missing: modulo | Show results with:modulo
  43. [43]
    JD (Julian Day) Number Tables Calculator For Any Given Year
    JD Number and Julian Date Tables for Any Given Year On the Old Julian or Modern Gregorian Calendar. Year Range = BC 4714 to AD 9999.
  44. [44]
    4-5-4 Calendar | NRF - National Retail Federation
    The 4-5-4 calendar is a guide for retailers that ensures sales comparability between years by dividing the year into months based on a 4 weeks – 5 weeks – 4 ...
  45. [45]
    The Republican calendar - napoleon.org
    As for the seven-day week, it was replaced by a ten-day cycle called a 'décade': day names were changed to primidi (oneday), duodi (twoday), tridi (threeday) ...
  46. [46]
    Mathematics of the ISO 8601 Calendar - Algorithms
    weekday=((wday+6)%7)+1; // weekdays will be numbered 1 to 7 isoyear=year; d0 ... number weeks starting either on Sunday or on Monday. Note that the ...<|separator|>
  47. [47]
    Calendrical Calculations - Cambridge University Press
    Cambridge Core - Practical and Amateur Astronomy - Calendrical Calculations.
  48. [48]
    Zeller's congruence - Project Nayuki
    Dec 11, 2022 · This page explains step by step how the algorithm works, and provides runnable library code and tests. Gregorian calendar rules. Calendar day.