12345678
12345678
ABCDEF
ABCDEF
ISO 8601
Dates & Week Numbers
ISO week date, ordinal date, durations between dates and ISO 8601 formatted representations.
Sheet24/27
Rev.A
SectionCodes
Scale1:1
UnitsSI
StatusReleased
Loading sheet…
ISO week date, ordinal date, durations between dates and ISO 8601 formatted representations.
Loading sheet…
ISO 8601-1 orders date and time elements from largest to smallest, avoiding the ambiguity of 03/04/05:
YYYY-MM-DD (basic: YYYYMMDD)YYYY-DDD, day of year 001–366YYYY-Www-D, Monday = 1 … Sunday = 7YYYY-MM-DDThh:mm:ss±hh:mm or Z for UTCPnYnMnDTnHnMnS, e.g. P1Y2M10DWeeks start on Monday, and week 01 is the week containing the year's first Thursday (equivalently, containing 4 January). Thus the week-numbering year can differ from the calendar year for dates near 1 January. For a date with weekday d (Mon = 1):
w = \left\lfloor \frac{\text{ordinal}(\text{Thursday of the same week}) - 1}{7} \right\rfloor + 1A year has 53 weeks if 1 January is a Thursday, or a Wednesday in a leap year. Using the helper
p(y) = \left(y + \left\lfloor\tfrac{y}{4}\right\rfloor - \left\lfloor\tfrac{y}{100}\right\rfloor + \left\lfloor\tfrac{y}{400}\right\rfloor\right) \bmod 7the year y has 53 weeks when p(y) = 4 or p(y-1) = 3. Leap years: divisible by 4, except centuries not divisible by 400 (Gregorian rule).