2025-02-16T12:47:41+00:00 UTC+00:00 [refresh] 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 (ISO) and was first published in 1988, with updates in 1991, 2000, 2004, and 2019, and an amendment in 2022.
ISO 8601 applies to these representations and formats: dates, in the Gregorian calendar (including the proleptic Gregorian calendar); times, based on the 24-hour timekeeping system, with optional UTC offset; time intervals; and combinations thereof.
Representations must be written in a combination of Arabic numerals and the specific computer characters (such as "‐", ":", "T", "W", "Z") that are assigned specific meanings within the standard; that is, such commonplace descriptors of dates (or parts of dates) as "January", "Thursday", or "New Year's Day" are not allowed in interchange representations within the standard.
[5] ISO 2014, though superseded, is the standard that originally introduced the all-numeric date notation in most-to-least-significant order [YYYY]-[MM]-[DD].
[9][10][11][12][13][14] An amendment 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.
Instead, the standard states that "values in the range [0000] through [1582] shall only be used by mutual agreement of the partners in information interchange".
[21] An expanded year representation [±YYYYY] must have an agreed-upon number of extra year digits beyond the four-digit minimum, and it must be prefixed with a + or − sign[22] instead of the more common AD/BC (or CE/BCE) notation; by convention 1 BC is labelled +0000, 2 BC is labeled −0001, and so on.
By disallowing dates of the form YYYYMM, the standard avoids confusion with the truncated representation[1][3] YYMMDD (still often used).
This simple form is preferable for occasions when the arbitrary nature of week and month definitions are more of an impediment than an aid, for instance, when comparing dates from different calendars.
Either the seconds, or the minutes and seconds, may be omitted from the basic or extended time formats for greater brevity but decreased precision; the resulting reduced precision time formats are:[26] As of ISO 8601-1:2019/Amd 1:2022, "00:00:00" may be used to refer to midnight corresponding to the instant at the beginning of a calendar day; and "24:00:00" to refer to midnight corresponding to the instant at the end of a calendar day.
[1] ISO 8601-1:2019 as originally published removed "24:00:00" as a representation for the end of day although it had been permitted in earlier versions of the standard.
A decimal fraction may be added to the lowest order time element present in any of these representations.
A decimal mark, either a comma or a dot on the baseline, is used as a separator between the time element and its fraction.
[28]) For example, to denote "14 hours, 30 and one half minutes", do not include a seconds figure; represent it as "14:30,5", "T1430,5", "14:30.5", or "T1430.5".
For example, in Microsoft SQL Server, the precision of a decimal fraction is 3 for a DATETIME, i.e., "yyyy-mm-ddThh:mm:ss[.mmm]".
GMT is no longer precisely defined by the scientific community and can refer to either UTC or UT1 depending on context.
[33] Contrary to this rule, RFC 3339, which is otherwise a profile of ISO 8601, permits the use of "−00" with the same denotation as "+00" but a differing connotation: an unknown UTC offset.
Leading zeros are not required, but the maximum number of digits for each element should be agreed to by the communicating parties.
For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds".
The standard does not prohibit date and time values in a duration representation from exceeding their "carry over points" except as noted below.
Section 3.2.6 of ISO 8601-1:2019 notes that "A solidus may be replaced by a double hyphen ["--"] by mutual agreement of the communicating partners", and previous versions used notations like "2000--2002".
They are formed by adding "R[n]/" to the beginning of an interval expression, where R is used as the letter itself and [n] is replaced by the number of repetitions.
ISO 8601:2000 allowed truncation (by agreement), where leading components of a date or time are omitted.
On the Internet, the World Wide Web Consortium (W3C) uses the IETF standard based on ISO 8601 in defining a profile of the standard that restricts the supported date and time formats to reduce the chance of error and the complexity of software.
As of 2006, the ISO week date appears in its basic form on major brand commercial packaging in the United States.
[citation needed] Its appearance depended on the particular packaging, canning, or bottling plant more than any particular brand.
[49] RFC 2822 made no claim that any part of its timestamp format conforms to ISO 8601, and so was free to use this convention without conflict.
[50] This format extends the timestamp representation to include additional information such as an associated time zone name.