ISO 8601


ISO 8601 is an international standard covering the worldwide exchange and communication of date and time-related data. It is maintained by the International Organization for Standardization and was first published in 1988, with updates in 1991, 2000, 2004, and 2019, and an amendment in 2022. The standard provides a well-defined, unambiguous method of representing calendar dates and times in worldwide communications, especially to avoid misinterpreting numeric dates and times when such data is transferred between countries with different conventions for writing numeric dates and times.
ISO 8601 applies to these representations and formats: dates, in the Gregorian calendar ; times, based on the 24-hour timekeeping system, with optional UTC offset, time intervals, and combinations thereof. The standard does not assign specific meaning to any element of the dates/times represented: the meaning of any element depends on the context of its use. Dates and times represented cannot use words that do not have a specified numerical meaning within the standard, or that do not use computer characters.
In representations that adhere to the ISO 8601 interchange standard, dates and times are arranged such that the greatest temporal term is placed at the left and each successively lesser term is placed to the right of the previous term. Representations must be written in a combination of Arabic numerals and the specific computer characters that are assigned specific meanings within the standard; that is, such commonplace descriptors of dates as "January", "Thursday", or "New Year's Day" are not allowed in interchange representations within the standard.

History

The first edition of the ISO 8601 standard was published as ISO 8601:1988 in 1988. It unified and replaced a number of older ISO standards on various aspects of date and time notation: ISO 2014, ISO 2015, ISO 2711, ISO 3307, and ISO 4031. It has been superseded by a second edition ISO 8601:2000 in 2000, by a third edition ISO 8601:2004 published on 1 December 2004, and withdrawn and revised by ISO 8601-1:2019 and ISO 8601-2:2019 on 25 February 2019. ISO 8601 was prepared by, and is under the direct responsibility of, ISO Technical Committee TC 154.
ISO 2014, though superseded, is the standard that originally introduced the all-numeric date notation in most-to-least-significant order. The ISO week numbering system was introduced in ISO 2015, and the identification of days by ordinal dates was originally defined in ISO 2711.
Issued in February 2019, the fourth revision of the standard ISO 8601-1:2019 represents slightly updated contents of the previous ISO 8601:2004 standard, whereas the new ISO 8601-2:2019 defines various extensions such as uncertainties or parts of the Extended Date/Time Format.
An amendment to ISO 8601-1 was published in October 2022 featuring minor technical clarifications and attempts to remove ambiguities in definitions. The most significant change, however, was the reintroduction of the "24:00:00" format to refer to the instant at the end of a calendar day.
An amendment to ISO 8601-2 was published in January 2025.
NameDescription
ISO 8601:1988Data elements and interchange formats — Information interchange — Representation of dates and times
ISO 8601:1988/COR 1:1991Data elements and interchange formats — Information interchange — Representation of dates and times — Technical Corrigendum 1
ISO 8601:2000Data elements and interchange formats — Information interchange — Representation of dates and times
ISO 8601:2004Data elements and interchange formats — Information interchange — Representation of dates and times
ISO 8601-1:2019Date and time — Representations for information interchange — Part 1: Basic rules
ISO 8601-2:2019Date and time — Representations for information interchange — Part 2: Extensions
ISO 8601-1:2019/Amd 1:2022Date and time — Representations for information interchange — Part 1: Basic rules — Amendment 1: Technical corrections
ISO 8601-2:2019/Amd 1:2025Date and time — Representations for information interchange — Part 2: Extensions — Amendment 1: Canonical expressions, extensions to time scale components and date time arithmetic

General principles

  • Date and time values are ordered from the largest to smallest unit of time: year, month, day, hour, minute, second, and fraction of second. The lexicographical order of the representation thus corresponds to chronological order, except for date representations involving negative years or time offset. This allows dates to be naturally sorted by, for example, file systems.
  • Each date and time value has a fixed number of digits that must be padded with leading zeros.
  • Representations can be done in one of two formatsa basic format with a minimal number of separators or an extended format with separators added to enhance human readability. The standard notes that "The basic format should be avoided in plain text." The separator used between date values is the hyphen, while the colon is used as the separator between time values. For example, the 6th day of the 1st month of the year 2009 may be written as in the extended format or as "20090106" in the basic format without ambiguity.
  • For reduced precision, any number of values may be dropped from any of the date and time representations, but in the order from the least to the most significant. For example, "2004-05" is a valid ISO 8601 date, which indicates May 2004. This format will never represent the 5th day of an unspecified month in 2004, nor will it represent a time-span extending from 2004 into 2005.
  • If necessary for a particular application, the standard supports the addition of a decimal fraction to the smallest time value in the representation.

    Dates

The standard uses the Gregorian calendar, which "serves as an international standard for civil use".
ISO 8601 allows Gregorian dates from the introduction of the calendar on 15 October 1582. For earlier dates, the calendar may be extended before its introduction by explicit agreement of the parties involved. Such proleptic dates may not be adjusted to reconcile them with Julian dates.

Years

ISO 8601 prescribes, as a minimum, a four-digit year to avoid the year 2000 problem. It therefore represents years from 0000 to 9999, year 0000 being equal to 1 BC and all others AD, similar to astronomical year numbering. However, years before 1583 are not automatically allowed by the standard. Instead, the standard states that "values in the range through shall only be used by mutual agreement of the partners in information interchange".
To represent years before 0000 or after 9999, the standard also permits the expansion of the year representation but only by prior agreement between the sender and the receiver. An expanded year representation must have an agreed-upon number of extra year digits beyond the four-digit minimum, and it must be prefixed with a + or - sign instead of the more common AD/BC notation; by convention 1 BC is labelled +0000, 2 BC is labeled -0001, and so on.

Calendar dates

Calendar date representations are in the form shown in the adjacent box. indicates a four-digit year, 0000 through 9999. indicates a two-digit month of the year, 01 through 12. indicates a two-digit day of that month, 01 through 31. For example, "5 April 1981" may be represented as either in the extended format or "19810405" in the basic format.
The standard also allows for calendar dates to be written with reduced precision. For example, one may write to mean "1981 April". One may simply write "1981" to refer to that year, "198" to refer to the decade from 1980 to 1989 inclusive, or "19" to refer to the century from 1900 to 1999 inclusive. Although the standard allows both the and YYYYMMDD formats for complete calendar date representations, if the day is omitted then only the format is allowed. By disallowing dates of the form YYYYMM, the standard avoids confusion with the [|truncated representation] YYMMDD. The 2000 version also allowed writing the truncation to mean "April 5" but the 2004 version does not allow omitting the year when a month is present.
Examples:
  • 7 January 2000 can be written as "2000-01-07" or "20000107"

    Week dates

YYYY-WwworYYYYWww
YYYY-Www-DorYYYYWwwD

Week date representations are in the formats as shown in the adjacent box. indicates the ISO week-numbering year which is slightly different from the traditional Gregorian calendar year. is the week number prefixed by the letter W, from W01 through W53. is the weekday number, from 1 through 7, beginning with Monday and ending with Sunday.
There are several mutually equivalent and compatible descriptions of week 01:
  • the week with the first business day in the starting year,
  • the week with the starting year's first Thursday in it,
  • the week with 4 January in it,
  • the first week with the majority of its days in the starting year, and
  • the week starting with the Monday in the period 29 December to 4 January.
As a consequence, if 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in week 01. If 1 January is on a Friday, Saturday or Sunday, it is in week 52 or 53 of the previous year. 28 December is always in the last week of its year.
The week number can be described by counting the Thursdays: Week 12 contains the 12th Thursday of the year.
The ISO week-numbering year starts at the first day of week 01 and ends at the Sunday before the new ISO year. It consists of 52 or 53 full weeks. The first ISO week of a year may have up to three days that are actually in the Gregorian calendar year that is ending; if three, they are Monday, Tuesday and Wednesday. Similarly, the last ISO week of a year may have up to three days that are actually in the Gregorian calendar year that is starting; if three, they are Friday, Saturday, and Sunday. The Thursday of each ISO week is always in the Gregorian calendar year denoted by the ISO week-numbering year.
Examples:
  • is written ""
  • is written ""