Recent from talks
Nothing was collected or created yet.
ISO 8601
View on Wikipedia| Date in UTC | 2025-10-24 |
|---|---|
| Time in UTC | 14:08:12Z T140812Z |
| Date and time in UTC | 2025-10-24T14:08:12Z 20251024T140812Z |
| Date and time with the offset | 2025-10-24T02:08:12-12:00 UTC−12:00 2025-10-24T14:08:12+00:00 UTC+00:00 |
| Week | 2025-W43 |
| Week with weekday | 2025-W43-5 |
| Ordinal date | 2025‐297 |
| Time |
|---|
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.[1] 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 (including the proleptic Gregorian calendar); times, based on the 24-hour timekeeping system, with optional UTC offset; time intervals; and combinations thereof.[2] 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 (thus excluding names of years in the Chinese calendar), or that do not use computer characters (excludes images or sounds).[2]
In representations that adhere to the ISO 8601 interchange standard, dates and times are arranged such that the greatest temporal term (typically a year) 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[3] 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.
History
[edit]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.[4] 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,[5] and is under the direct responsibility of, ISO Technical Committee TC 154.[6]
ISO 2014, though superseded, is the standard that originally introduced the all-numeric date notation in most-to-least-significant order [YYYY]-[MM]-[DD]. 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,[3] the fourth revision of the standard ISO 8601-1:2019 represents slightly updated contents of the previous ISO 8601:2004 standard,[7][1] whereas the new ISO 8601-2:2019 defines various extensions such as uncertainties or parts of the Extended Date/Time Format (EDTF).[8][9][10][11][12][13]
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.
| Name | Description |
|---|---|
| ISO 8601:1988 | Data elements and interchange formats — Information interchange — Representation of dates and times |
| ISO 8601:1988/COR 1:1991 | Data elements and interchange formats — Information interchange — Representation of dates and times — Technical Corrigendum 1 |
| ISO 8601:2000 | Data elements and interchange formats — Information interchange — Representation of dates and times |
| ISO 8601:2004 | Data elements and interchange formats — Information interchange — Representation of dates and times |
| ISO 8601-1:2019 | Date and time — Representations for information interchange — Part 1: Basic rules |
| ISO 8601-2:2019 | Date and time — Representations for information interchange — Part 2: Extensions |
| ISO 8601-1:2019/Amd 1:2022 | Date and time — Representations for information interchange — Part 1: Basic rules — Amendment 1: Technical corrections |
| ISO 8601-2:2019/Amd 1:2025 | Date and time — Representations for information interchange — Part 2: Extensions — Amendment 1: Canonical expressions, extensions to time scale components and date time arithmetic |
General principles
[edit]- Date and time values are ordered from the largest to smallest unit of time: year, month (or week), 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 formats – a basic format with a minimal number of separators or an extended format with separators added to enhance human readability.[14][15] The standard notes that "The basic format should be avoided in plain text."[16] The separator used between date values (year, month, week, and day) is the hyphen, while the colon is used as the separator between time values (hours, minutes, and seconds). For example, the 6th day of the 1st month of the year 2009 may be written as "2009-01-06" in the extended format or as "20090106" in the basic format without ambiguity.
- For reduced precision,[17] 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 (the fifth month) 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
[edit]| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W40 | 29 | 30 | 01 | 02 | 03 | 04 | 05 |
| W41 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
| W42 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| W43 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| W44 | 27 | 28 | 29 | 30 | 31 | 01 | 02 |
The standard uses the Gregorian calendar, which "serves as an international standard for civil use".[18]
ISO 8601 allows Gregorian dates from the introduction of the calendar on 15 October 1582. For earlier (pre-Gregorian) dates, the calendar may be extended before its introduction (the proleptic Gregorian calendar) by explicit agreement of the parties involved. Such proleptic dates may not be adjusted to reconcile them with Julian dates.
Years
[edit]| YYYY |
ISO 8601 prescribes, as a minimum, a four-digit year [YYYY] 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 (the first full year following the introduction of the Gregorian calendar) are not automatically allowed by the standard. 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".[19]
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.[20] 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[21] 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.[22]
Calendar dates
[edit]| YYYY-MM-DD | or | YYYYMMDD |
| YYYY-MM | (but not YYYYMM) | |
| Only allowed in the (now superseded) 2000 version:[24] | ||
| YY-MM-DD | or | YYMMDD |
| -YY-MM | or | -YYMM |
| --MM-DD | or | --MMDD |
| --MM | ||
| ---DD | ||
Calendar date representations are in the form shown in the adjacent box. [YYYY] indicates a four-digit year, 0000 through 9999. [MM] indicates a two-digit month of the year, 01 through 12. [DD] indicates a two-digit day of that month, 01 through 31. For example, "5 April 1981" may be represented as either "1981-04-05"[14] 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 "1981-04" 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 "YYYY-MM-DD" and YYYYMMDD formats for complete calendar date representations, if the day [DD] is omitted then only the YYYY-MM format is allowed. By disallowing dates of the form YYYYMM, the standard avoids confusion with the truncated representation[25][4] YYMMDD (still often used). The 2000 version also allowed writing the truncation "--04-05" to mean "April 5"[23] 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
[edit]| YYYY-Www | or | YYYYWww |
| YYYY-Www-D | or | YYYYWwwD |
Week date representations are in the formats as shown in the adjacent box. [YYYY] indicates the ISO week-numbering year which is slightly different from the traditional Gregorian calendar year (see below). [Www] is the week number prefixed by the letter W, from W01 through W53. [D] 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 (considering that Saturdays, Sundays and 1 January are non-working days),
- the week with the starting year's first Thursday in it (the formal ISO definition),
- the week with 4 January in it,
- the first week with the majority (four or more) 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 (there is no week 00). 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 (Monday) of week 01 and ends at the Sunday before the new ISO year (hence without overlap or gap). 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:
- Monday 29 December 2008 is written "2009-W01-1"
- Sunday 3 January 2010 is written "2009-W53-7"
Ordinal dates
[edit]| YYYY-DDD | or | YYYYDDD |
An ordinal date is an ordinal format for the multiples of a day elapsed since the start of year. It is represented as "YYYY-DDD" (or YYYYDDD), where [YYYY] indicates a year and [DDD] is the "day of year", from 001 through 365 (366 in leap years). For example, "1981-04-05" is the same as "1981-095".
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. This format is used with simple hardware systems that have a need for a date system, but where including full calendar calculation software may be a significant nuisance. This system is sometimes referred to as "Julian Date", but this can cause confusion with the astronomical Julian day, a sequential count of the number of days since day 0 beginning 1 January 4713 BC Greenwich noon, Julian proleptic calendar (or noon on ISO date -4713-11-24 which uses the Gregorian proleptic calendar with a year 0000).
Times
[edit]| Thh:mm:ss.sss | or | Thhmmss.sss |
| Thh:mm:ss | or | Thhmmss |
| Thh:mm.mmm | or | Thhmm.mmm |
| Thh:mm | or | Thhmm |
| Thh.hhh | ||
| Thh | ||
| In unambiguous contexts | ||
| hh:mm:ss.sss | or | hhmmss.sss |
| hh:mm:ss | or | hhmmss |
| hh:mm | or | hhmm |
| hh | ||
ISO 8601 uses the 24-hour clock system. As of ISO 8601-1:2019, the basic format is T[hh][mm][ss] and the extended format is T[hh]:[mm]:[ss]. Earlier versions omitted the T (representing time) in both formats.
- [hh] refers to a zero-padded hour between 00 and 24.
- [mm] refers to a zero-padded minute between 00 and 59.
- [ss] refers to a zero-padded second between 00 and 60 (where 60 is only used to denote an added leap second).
So a time might appear as either "T134730" in the basic format or "T13:47:30" in the extended format. ISO 8601-1:2019 allows the T to be omitted in the extended format, as in "13:47:30", but only allows the T to be omitted in the basic format when there is no risk of confusion with date expressions.
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]
- T[hh][mm] in basic format or T[hh]:[mm] in extended format, when seconds are omitted.
- T[hh], when both seconds and minutes are omitted.
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.[25] 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. (Following ISO 80000-1 according to ISO 8601:1-2019,[27] it does not stipulate a preference except within International Standards, but with a preference for a comma according to ISO 8601:2004.[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".
There is no limit on the number of decimal places for the decimal fraction. However, the number of decimal places needs to be agreed to by the communicating parties. 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]".[29]
Time zone designators
[edit]| <time>Z |
| <time>±hh:mm |
| <time>±hhmm |
| <time>±hh |
Time zones in ISO 8601 are represented as local time (with the location unspecified), as UTC, or as an offset from UTC.
Local time (unqualified)
[edit]If no UTC relation information is given with a time representation, the time is assumed to be in local time. While it may be safe to assume local time when communicating in the same time zone, it is ambiguous when used in communicating across different time zones. Even within a single geographic time zone, some local times will be ambiguous if the region observes daylight saving time. It is usually preferable to indicate a time zone (zone designator) using the standard's notation.
Coordinated Universal Time (UTC)
[edit]If the time is in UTC, add a Z directly after the time without a space. Z is the zone designator for the zero UTC offset. "09:30 UTC" is therefore represented as "09:30Z" or "T0930Z". "14:45:15 UTC" would be "14:45:15Z" or "T144515Z".
The Z suffix in the ISO 8601 time representation is sometimes referred to as "Zulu time" or "Zulu meridian" because the same letter is used to designate the Zulu time zone.[30] However the ACP 121 standard that defines the list of military time zones makes no mention of UTC and derives the "Zulu time" from the Greenwich Mean Time[31] which was formerly used as the international civil time standard. GMT is no longer precisely defined by the scientific community and can refer to either UTC or UT1 depending on context.[32]
Time offsets from UTC
[edit]The UTC offset is appended directly to the time instead of "Z" suffix above; other nautical time zone letters are not used. The offset is applied to UTC to get the civil time in the designated time zone in the format '±[hh]:[mm]', '±[hh][mm]', or '±[hh]'.
A negative UTC offset describes a time zone west of the prime meridian where the civil time is behind UTC. So the zone designation for New York (on standard time) would be "−05:00","−0500", or "−05". Conversely, a positive UTC offset describes a time zone east of the prime meridian where the civil time is ahead of UTC. So the zone designation for Cairo will be "+02:00","+0200", or "+02".
A time zone where the civil time coincides with UTC is always designated as positive, though the offset is zero (see related specifications below). So the zone designation for London (on standard time) would be "+00:00", "+0000", or "+00".
Additional examples
[edit]- "−10:00" for Honolulu
- "−06:00" for Chicago on standard time, or Denver on daylight saving time
- "−03:00" for Brasília
- "+01:00" for London on British Summer Time
- "+04:00" for Dubai
- "+05:30" for India
- "+09:00" for Japan
See List of UTC offsets for other UTC offsets.
Other time offset specifications
[edit]It is not permitted to state a zero value time offset with a negative sign, as "−00:00", "−0000", or "−00". The section dictating sign usage states that a plus sign must be used for a positive or zero value, and a minus sign for a negative value. A plus-minus-sign (±) may also be used if it is available.[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.[34][35]
To represent a negative offset, ISO 8601 specifies using a minus sign (−). If the interchange character set is limited and does not have a minus sign character, then the hyphen-minus should be used (-).[36] ASCII does not have a minus sign, so its hyphen-minus character (code 4510) would be used. If the character set has a minus sign, such as U+2212 − MINUS SIGN in Unicode, then that character should be used. The HTML character entity invocation for − is −.
ISO 8601-2:2019 allows for general durations for time offsets. For example, more precision can be added to the time offset with the format '<time>±[hh]:[mm]:[ss].[sss]' or '<time>±[n]H[n]M[n]S' as below.
Combined date and time representations
[edit]| <date>T<time> |
A single point in time can be represented by concatenating a complete date expression, the letter "T" as a delimiter, and a valid time expression. For example, "2007-04-05T14:30". In ISO 8601:2004 it was permitted to omit the "T" character by mutual agreement as in "200704051430",[37] but this provision was removed in ISO 8601-1:2019. Separating date and time parts with other characters such as space is not allowed in ISO 8601, but allowed in its profile RFC 3339.[38]
If a time zone designator is required, it follows the combined date and time. For example, "2007-04-05T14:30Z" or "2007-04-05T12:30-02:00".
Either basic or extended formats may be used, but both date and time must use the same format. The date expression may be calendar, week, or ordinal, and must use a complete representation. The time may be represented using a specified reduced precision format.
Durations
[edit]| PnYnMnDTnHnMnS |
| PnW |
| P<date>T<time> |
Durations define the amount of intervening time in a time interval and are represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S or P[n]W as shown on the aside. In these representations, the [n] is replaced by the value for each of the date and time elements that follow the [n]. Leading zeros are not required, but the maximum number of digits for each element should be agreed to by the communicating parties. The capital letters P, Y, M, W, D, T, H, M, and S are designators for each of the date and time elements and are not replaced.[39]
- P is the duration designator (for period) placed at the start of the duration representation.
- Y is the year designator that follows the value for the number of calendar years.
- M is the month designator that follows the value for the number of calendar months.
- W is the week designator that follows the value for the number of weeks.
- D is the day designator that follows the value for the number of calendar days.
- T is the time designator that precedes the time components of the representation.
- H is the hour designator that follows the value for the number of hours.
- M is the minute designator that follows the value for the number of minutes.
- S is the second designator that follows the value for the number of seconds.
For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds".
Date and time elements including their designator may be omitted if their value is zero, and lower-order elements may also be omitted for reduced precision. For example, "P23DT23H" and "P4Y" are both acceptable duration representations. However, at least one element must be present, thus "P" is not a valid representation for a duration of 0 seconds. "PT0S" or "P0D", however, are both valid and represent the same duration.
To resolve ambiguity, "P1M" is a one-month duration and "PT1M" is a one-minute duration (note the time designator, T, that precedes the time value). The smallest value used may also have a decimal fraction,[40] as in "P0.5Y" to indicate half a year. This decimal fraction may be specified with either a comma or a full stop, as in "P0,5Y" or "P0.5Y". The standard does not prohibit date and time values in a duration representation from exceeding their "carry over points" except as noted below. Thus, "PT36H" could be used as well as "P1DT12H" for representing the same duration. But keep in mind that "PT36H" is not the same as "P1DT12H" when switching from or to Daylight saving time.
Alternatively, a format for duration based on combined date and time representations may be used by agreement between the communicating parties either in the basic format PYYYYMMDDThhmmss or in the extended format P[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]. For example, the first duration shown above would be "P0003-06-04T12:30:05". However, individual date and time values cannot exceed their moduli (e.g. a value of 13 for the month or 25 for the hour would not be permissible).[41]
The standard describes a duration as part of time intervals, which are discussed in the next section. The duration format on its own is ambiguous regarding the total number of days in a calendar year and calendar month. The number of seconds in a calendar day is also ambiguous because of leap seconds. For example "P1M" on its own could be 28, 29, 30, or 31 days. There is no ambiguity when used in a time interval. Using example "P2M" duration of two calendar months:
- interval 2003-02-15T00:00:00Z/P2M ends two calendar months later at 2003-04-15T00:00:00Z which is 59 days later
- interval 2003-07-15T00:00:00Z/P2M ends two calendar months later at 2003-09-15T00:00:00Z which is 62 days later
The duration format (or a subset thereof) is widely used independent of time intervals, as with the Java 8 Duration class which supports a subset of the duration format.[42][43]
Time intervals
[edit]| <start>/<end> |
| <start>/<duration> |
| <duration>/<end> |
| <duration> |
A time interval is the intervening time between two time points. The amount of intervening time is expressed by a duration (as described in the previous section). The two time points (start and end) are expressed by either a combined date and time representation or just a date representation.
There are four ways to express a time interval:
- Start and end, such as "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z"
- Start and duration, such as "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
- Duration and end, such as "P1Y2M10DT2H30M/2008-05-11T15:30:00Z"
- Duration only, such as "P1Y2M10DT2H30M", with additional context information
Of these, the first three require two values separated by an interval designator which is usually a solidus (more commonly referred to as a forward slash "/"). 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".[44] Use of a double hyphen instead of a solidus allows inclusion in computer filenames;[45] in common operating systems, a solidus is a reserved character and is not allowed in a filename.
For <start>/<end> expressions, if any elements are missing from the end value, they are assumed to be the same as for the start value including the time zone. This feature of the standard allows for concise representations of time intervals. For example, the date of a two-hour meeting including the start and finish times could be shown as "2007-12-14T13:30/15:30", where "/15:30" implies "/2007-12-14T15:30" (the same date as the start), or the beginning and end dates of a monthly billing period as "2008-02-15/03-14", where "/03-14" implies "/2008-03-14" (the same year as the start).
If greater precision is desirable to represent the time interval, then more time elements can be added to the representation. An interval denoted "2007-11-13/15" can start at any time on 2007-11-13 and end at any time on 2007-11-15, whereas "2007-11-13T09:00/15T17:00" includes the start and end times. To explicitly include all of the start and end dates, the interval would be represented as "2007-11-13T00:00/16T00:00".
Repeating intervals
[edit]| Rn/<interval> |
| R/<interval> |
Repeating intervals are specified in clause "4.5 Recurring time interval". 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. Leaving out the value for [n] or specifying a value of -1, means an unbounded number of repetitions. A value of 0 for [n] means the interval is not repeated.
If the interval specifies the start (forms 1 and 2 above), then this is the start of the repeating interval. If the interval specifies the end but not the start (form 3 above), then this is the end of the repeating interval. For example, to repeat the interval of "P1Y2M10DT2H30M" five times starting at "2008-03-01T13:00:00Z", use "R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M".
Truncated representations (deprecated)
[edit]ISO 8601:2000 allowed truncation (by agreement), where leading components of a date or time are omitted. Notably, this allowed two-digit years to be used as well as the ambiguous formats YY-MM-DD and YYMMDD. This provision was removed in ISO 8601:2004.
| Type | Basic format | Basic example | Extended format | Extended example |
|---|---|---|---|---|
| A specific date in the implied century | YYMMDD | 851026 | YY-MM-DD | 85-10-26 |
| A specific year and month in the implied century | -YYMM | -8510 | -YY-MM | -85-10 |
| A specific year in the implied century | -YY | -85 | — | |
| A specific day of a month in the implied year | --MMDD | --1026 | --MM-DD | --10-26 |
| A specific month in the implied year | --MM | --10 | — | |
| A specific day in the implied month | ---DD | ---26 | ||
| A specific year and ordinal day in the implied century | YYDDD | 85299 | YY-DDD | 85-299 |
| A specific ordinal day in the implied year | -DDD | -299 | — | |
| A specific year and week in the implied decade | -YWww | -5W43 | -Y-Www | -5-W43 |
| A specific week and day in the implied year | -WwwD | -W436 | -Www-D | -W43-6 |
| A specific day in the implied week | -W-D | -W-6 | — | |
| A specific minute and second of the implied hour | -mmss | -3456 | -mm:ss | -34:56 |
| A specific second of the implied minute | -ss | -56 | — | |
| A specific minute and decimal fraction of the implied hour | -mm,m | -34,9 | — | |
The first and seventh examples given above omit the leading - for century. Other formats have one leading - per omitted century, year, month, week, hour and minute as necessary to disambiguate the format.
Standardised extensions
[edit]ISO 8601-2:2019 defines a set of standardised extensions to the ISO 8601 date and time formats.
Extended Date/Time Format (EDTF)
[edit]The EDTF is given as an example of a profile of ISO 8601 in Part 2. It comes in three levels, where level 0 is a subset of Part 1 restricted to extended month-day notation, CCYY-MM-DD, similar to RFC 3339, and levels 1 and 2 build upon that.
EDTF is mostly tailored to bibliographic and historiographic needs. Some of its features are:[8]
- Uncertain and approximate qualifiers, '?' and '~', as well as their combined used, '%'; they can be applied to the whole date or to individual components.
- Time intervals with an open (unbounded) or unknown end or start, e.g. "../2025" or "2024/".
- Exponential ('E') and significant figure ('S') notation in years with a new 'Y' prefix, e.g. "Y-1.25E6S2".
- Special "month" values indicating sub-year groupings such as seasons and quarters, e.g. "2025-26" for summer in the Northern hemisphere.
- Syntax for serializing a list of dates within brackets '[]' for single choices or braces '{}' for inclusive lists.
The EDTF features are described in the "Date and Time Extensions" section of ISO 8601-2:2019, and the profile itself is found as Annex A. It is virtually identical to the prior specification pioneered by the US Library of Congress.[8]
Repeat rules for recurring time intervals
[edit]ISO 8601-2:2019 also defines a format to constrain repeating intervals based on syntax from iCalendar, i.e. IETF RFC 5545.
Implementations
[edit]GNU CoreUtils's date command has an --iso-8601 option[46] among other formating patterns:
$ date --iso-8601=ns
2025-02-16T12:03:17,646296349+01:00
$ date -u --rfc-3339=ns
2025-02-16 10:58:44.966864492+00:00
$ date -u +"%Y-%m-%dT%H:%M:%S.%6NZ"
2025-02-16T10:58:44.965071Z
Usage
[edit]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. The very simple specification is based on a draft of the RFC 3339 mentioned below.[47]
ISO 8601 is referenced by several specifications, but the full range of options of ISO 8601 is not always used. For example, the various electronic program guide standards for TV, digital radio, etc. use several forms to describe points in time and durations. The ID3 audio meta-data specification also makes use of a subset of ISO 8601.[48] The X.690 encoding standard's GeneralizedTime makes use of another subset of ISO 8601.
Commerce
[edit]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. The format is particularly useful for quality assurance, so that production errors can be readily traced.
RFCs
[edit]IETF RFC 3339[49] defines a profile of ISO 8601 for use in Internet protocols and standards. It explicitly excludes durations and dates before the common era. The more complex formats such as week numbers and ordinal days are not permitted.[50]
RFC 3339 deviates from ISO 8601 in allowing a zero time zone offset to be specified as "-00:00", which ISO 8601 forbids. RFC 3339 intends "-00:00" to carry the connotation that it is not stating a preferred time zone, whereas the conforming "+00:00" or any non-zero offset connotes that the offset being used is preferred. This convention regarding "-00:00" is derived from earlier RFCs, such as RFC 2822 which uses it for timestamps in email headers.[51] 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.
Building upon the foundations of RFC 3339, the IETF introduced the Internet Extended Date/Time Format (IXDTF) in RFC 9557.[52] This format extends the timestamp representation to include additional information such as an associated time zone name. The inclusion of time zone names is particularly useful for applications that need to account for events like daylight saving time transitions. Furthermore, IXDTF maintains compatibility with pre-existing syntax for attaching time zone names to timestamps, providing a standardized and flexible approach to timestamp representation on the internet. Example:
1996-12-19T16:39:57-08:00[America/Los_Angeles]
Adoption as national standards
[edit]| Australia | AS/NZS ISO 8601.1:2021, AS/NZS ISO 8601.2:2021 (replaced AS ISO 8601-2007) |
|---|---|
| Austria | ÖNORM ISO 8601 (replaced ÖNORM EN 28601) |
| Belgium | NBN EN 28601 (1993) |
| Brazil | NBR 5892:2019 |
| Canada | ISO 8601-1:2019/Amd 1:2022[53] |
| Colombia | NTC 1034:2014[54] |
| China | GB/T 7408-2005 |
| Czech Republic | ČSN ISO 8601 (replaced ČSN EN 28601) (Obsolete as of 2019. No standard was given in exchange.[55]) |
| Denmark | DS/ISO 8601:2005 (replaced DS/EN 28601) |
| Estonia | EVS 8:2008; EVS-ISO 8601:2011 |
| European Norm | EN ISO 8601, EN 28601:1992 (cancelled 7 October 2011) |
| Finland | SFS-EN 28601 |
| France | NF Z69-200; NF EN 28601:1993-06-01 (cancelled) |
| Germany | DIN ISO 8601:2006-09 (replaced DIN EN 28601:1993-02); related: DIN 5008:2011-04 (replaced DIN 5008:2005-05, DIN 5008:2001-11, DIN 5008:1996-05) |
| Greece | ELOT EN 28601 |
| Hungary | MSZ ISO 8601:2003 |
| Iceland | IST EN 28601:1992 (obsolete) |
| India | IS 7900:2001 |
| Ireland | IS/EN 28601:1993 |
| Italy | UNI EN 28601 (1993) |
| Japan | JIS X 0301:2002 |
| Korea, Republic of | KS X ISO 8601 |
| Lithuania | LST ISO 8601:2006 (replaced LST ISO 8601:1997) |
| Luxembourg | ITM-EN 28601 |
| Mexico | NMX-CH-150-IMNC-1999[56] |
| Netherlands | NEN ISO 8601, NEN EN 28601 (1994), NEN 2772 |
| New Zealand | AS/NZS ISO 8601.1:2021, AS/NZS ISO 8601.2:2021 |
| Norway | NS-ISO 8601 |
| Poland | PN-EN 28601:2002 (Obsolete as of 2008. No standard was given in exchange.[57]) |
| Portugal | NP EN 28601 |
| Russia | ГОСТ ИСО 8601-2001 (current), ГОСТ 7.64-90 (obsolete) |
| South Africa | SANS 8601:2009[58] |
| Spain | UNE EN 28601:1995 |
| Sweden | SS-ISO 8601-1:2022,[59] contains the official English version of ISO 8601-1:2019. (Approved 2022-05-13, replaces SS-ISO 8601:2011, edition 2) |
| Switzerland | SN ISO 8601:2005-08 (replaced SN-EN 28601:1994) |
| Taiwan | CNS 7648 |
| Thailand | TIS 1111:2535 (1992) |
| Turkey | TS ISO 8601-1[60] and TS ISO 8601-2[61] (Accepted from 2021-02-15) |
| Ukraine | ДСТУ ISO 8601:2010 |
| United Kingdom | BS ISO 8601:2004, BS EN 28601 (1989-06-30) |
| United States | ANSI INCITS 30-1997 (R2008) and NIST FIPS PUB 4-2 |
| Vietnam | TCVN 6398-1:1998[62] |
See also
[edit]Notes and references
[edit]- ^ a b "German draft E DIN ISO 8601-1:2017-02 Datenelemente und Austauschformate - Informationsaustausch - Darstellung von Datum und Uhrzeit - Teil 1: Grundlegende Regeln (ISO/DIS 8601-1:2016)". DIN-Normenausschuss Informationstechnik und Anwendungen (NIA). Archived from the original on 2017-10-20. Retrieved 2017-10-19.
- ^ a b ISO 8601:2004[E] section 1 Scope
- ^ a b "Introduction to the new ISO 8601-1 and ISO 8601-2". ISO/TC 154. 26 August 2019.
- ^ a b ISO 8601:2004(E), ISO, 2004-12-01,
Annex A: ... From that concept representations of all other date and time values were logically derived; thus, ISO 2014, ISO 3307 and ISO 4031 have been superseded. ... Identification of a particular date by means of ordinal dates (ISO 2711) and by means of the week numbering system (ISO 2015) were alternative methods that the basic concept of this International Standard could also encompass; thus, ISO 2015 and ISO 2711 have now been superseded.
- ^ ISO 8601:2004(E). ISO. 2004-12-01. p. iv Foreword.
- ^ "TC 154 Processes, data elements and documents in commerce, industry and administration". Technical committees. ISO. Archived from the original on 2016-05-25. Retrieved 2014-08-16.
- ^ "ISO/DIS 8601-1:2016-10-26" (PDF). Library of Congress. Archived from the original (PDF) on 2017-10-19.
- ^ a b c "Extended Date/Time Format (EDTF) Specification". The Library of Congress. 2019-10-08 [2019-02-04, 2014, 2012]. Archived from the original on 2020-03-07. Retrieved 2020-03-07.
- ^ "Extended Date/Time Format (EDTF) Background". The Library of Congress. 2019-10-08 [2019-03-01]. Archived from the original on 2020-03-07. Retrieved 2020-03-07.
- ^ "Extended Date/Time Format (EDTF) 1.0 2012/2014". Draft Submission. The Library of Congress. Archived from the original on 2017-07-15. Retrieved 2017-07-15.
- ^ "ISO/WD 8601-2:2016-02-16" (PDF). Library of Congress. Archived from the original (PDF) on 2017-10-19.
- ^ "ISO/DIS 8601-2:2016-10-26" (PDF). Library of Congress. Archived from the original (PDF) on 2017-10-20.
- ^ "German draft E DIN ISO 8601-2:2017-02 Datenelemente und Austauschformate - Informationsaustausch - Darstellung von Datum und Uhrzeit - Teil 2: Erweiterungen (ISO/DIS 8601-2:2016)". DIN-Normenausschuss Informationstechnik und Anwendungen (NIA). Archived from the original on 2017-10-19. Retrieved 2017-10-19.
- ^ a b ISO: "ISO 8601 — Date and time format". Archived 2013-03-08 at the Wayback Machine.
- ^ Wolf, Misha; Wicksteed, Charles (15 September 1997). "Date and Time Formats". W3C. Archived from the original on 10 May 2021. Retrieved 11 May 2021.
- ^ ISO 8601:2004 section 2.3.3 basic format
- ^ Earlier versions of ISO 8601 used the word accuracy, not precision, in the relevant section, e.g: 2.3.7 representation with reduced accuracy. This was corrected in ISO 8601-1:2019.
- ^ Doggett, L. E. (1992). "Calendars". In P. K. Seidelmann (ed.). Explanatory Supplement to the Astronomical Almanac. Sausalito, California: University Science Books. p. 580. ISBN 0-935702-68-7. Archived from the original on 2004-04-01.
The Gregorian calendar today serves as an international standard for civil use.
- ^ ISO 8601:2004(E). ISO. 2004-12-01. section 4.1.2.1 General.
- ^ ISO 8601:2004(E). ISO. 2004-12-01.
3.5 Expansion ... By mutual agreement of the partners in information interchange, it is permitted to expand the component identifying the calendar year, which is otherwise limited to four digits. This enables reference to dates and times in calendar years outside the range supported by complete representations, i.e. before the start of the year [0000] or after the end of the year [9999].
- ^ ISO 8601:2004 sections 3.4.2, 4.1.2.4
- ^ For example, see Annex B.1.1 of the standard.
- ^ a b Perreault, S. (August 2011). "DATE". vCard Format Specification. IETF. sec. 4.3.1. doi:10.17487/RFC6350. RFC 6350. Retrieved 2021-01-21.
Truncated representation, as specified in [ISO.8601.2000], Sections 5.2.1.3 d), e), and f), is permitted.
- ^ Last in ISO 8601:2000, removed in ISO 8601:2004, in use by RFC6350[23]
- ^ a b ISO 8601-1:2019/Amd 1:2022, ISO, 2022-10-25
- ^ ISO 8601-1:2019 section 5.3.1.3 Representations with reduced precision
- ^ ISO 8601-1:2019 section 3.1.3.9 Decimal sign
- ^ ISO 8601:2004(E), ISO, 2004-12-01,
4.2.2.4 ... the decimal fraction shall be divided from the integer part by the decimal sign specified in ISO 31-0, i.e. the comma [,] or full stop [.]. Of these, the comma is the preferred sign.
- ^ "ISO 8601 Format". TechNet. Microsoft Docs. 3 December 2008. Archived from the original on 2021-10-20. Retrieved 2021-10-20.
- ^ Markus Kuhn (2020-06-16). "A summary of the international standard date and time notation". Archived from the original on 2022-10-05. Retrieved 2022-10-05.
- ^ "Communication Instructions General ACP 121(I)" (PDF). Combined Communications Electronics Board. October 2010. Archived (PDF) from the original on 2018-01-16. Retrieved 2018-01-15.
- ^ McCarthy, Dennis D.; Seidelmann, Kenneth P. (2009). Time: From Earth Rotation to Atomic Physics. Weinheim: Wiley-VCH Verlag GmbH & Co. KGaA. p. 10. ISBN 978-3-527-40780-4.
- ^ ISO 8601-1:2019 section 3.2.4, ISO 8601:2004 section 3.4.2
- ^ RFC 3339 – Unknown local offset convention
- ^ Newman, Chris (July 2002). "Unknown Local Offset Convention". In Klyne, Graham (ed.). Date and Time on the Internet:Timestamps. IETF. sec. 4.3. doi:10.17487/RFC3339. RFC 3339. Retrieved 1 February 2021.
If the time in UTC is known, but the offset to local time is unknown, this can be represented with an offset of "-00:00". This differs semantically from an offset of "Z" or "+00:00", which imply that UTC is the preferred reference point for the specified time. RFC2822 [IMAIL-UPDATE] describes a similar convention for email
- ^ "3.4.1 Characters used in the representations - Introduction". Data elements and interchange formats — Information interchange - Representation of dates and times — Part 1: Basic rules (PDF). ISO. 2016-02-16. p. 12. ISO/WD 8601-1. Archived (PDF) from the original on 2022-10-05.
In an environment where use is made of a character repertoire based on ISO/IEC 646, "hyphen" and "minus" are both mapped onto "hyphen-minus". Representations with a "plus-minus" shall only be used in such environment if the interchange repertoire includes "plus-minus"
- ^ ISO 8601:2004(E): Data elements and interchange formats — Information interchange — Representation of dates and times. ISO. 2004-12-01.
4.3.2 NOTE: By mutual agreement of the partners in information interchange, the character [T] may be omitted in applications where there is no risk of confusing a date and time of day representation with others defined in this International Standard.
- ^ G. Klyne; C. Newman (July 2002). "Internet Date/Time Format". Date and Time on the Internet: Timestamps. sec. 5.6. doi:10.17487/RFC3339. RFC 3339.
NOTE: ISO 8601 defines date and time separated by "T". Applications using this syntax may choose, for the sake of readability, to specify a full-date and full-time separated by (say) a space character.
- ^ "Data elements and interchange formats — Information interchange - Representation of dates and times — Part 1: Basic rules" (PDF). Library of Congress. p. 23. Archived (PDF) from the original on 2021-03-12. Retrieved 2025-10-11.
§ 4.4.3.2 Format with designators. [...] the maximum number of digits in a component needs to be agreed by the partners in information interchange. [...]
- ^ "Data elements and interchange formats — Information interchange - Representation of dates and times — Part 1: Basic rules" (PDF). The Library of Congress. p. 23. Archived (PDF) from the original on 2021-03-12. Retrieved 2021-07-06.
b) If necessary for a particular application, the lowest order components may have a decimal fraction.
- ^ ISO 8601:2004 section 4.4.3.3 Alternative format, ISO 8601-1:2019 section 5.5.2.4 Alternative format
- ^ "Java 8 Class Duration". Java Platform Standard Edition 8. Oracle. Archived from the original on 2017-10-14. Retrieved 2017-10-07.
- ^ "Amazon Alexa Duration". Amazon Developer. Amazon.com. Archived from the original on 2017-10-14. Retrieved 2017-10-07.
- ^ "Info on ISO 8601, the date and time representation standard". Cs.tut.fi. Archived from the original on 2017-10-14. Retrieved 2012-08-29.
- ^ "ISO 8601 - Getting with the Times (and Dates)". Hydrogold. 2012-01-01. Archived from the original on 2014-01-25. Retrieved 2013-08-13.
- ^ Options for date
- ^ Note about Date and Time Formats to W3C from Reuters Archived 2011-08-24 at the Wayback Machine
- ^ Nilsson, M. (2000-11-01). "ID3 tag version 2.4.0 - Main Structure". id3.org. pp. §4. Archived from the original on 2015-03-09. Retrieved 2009-09-27.
- ^ Newman, Chris; Klyne, Graham (July 2002). Date and Time on the Internet: Timestamps. IETF. doi:10.17487/RFC3339. RFC 3339. Retrieved 2015-10-25.
- ^ Newman, Chris; Klyne, Graham (July 2002). "Internet Date/Time Format". Date and Time on the Internet: Timestamps. IETF. p. 8. sec. 5.6. doi:10.17487/RFC3339. RFC 3339. Retrieved 2015-10-25.
- ^ "Date and Time Specification". Internet Message Format. IETF. April 2001. p. 14. sec. 3.3. doi:10.17487/RFC2822. RFC 2822.
- ^ Sharma, Ujjwal; Bormann, Carsten (2024). Date and Time on the Internet: Timestamps with Additional Information. IETF. doi:10.17487/RFC9557. RFC 9557. Retrieved 2024-05-28.
- ^ National Standard of Canada, "ISO 8601-1:2019/Amd 1:2022: Date and time — Representations for information interchange". Standards Council of Canada. 2022-10-24. Retrieved 2025-03-22.
- ^ Source ICONTEC (This standard is identical to ISO 8601:2004) Archived 2020-01-16 at the Wayback Machine
- ^ "ČSN ISO 8601 (979738) Datové prvky a formáty výměny - Výměna informací - Zobrazení data a času". 2023-04-17. Retrieved 2023-04-17.
- ^ "DOF - Diario Oficial de la Federación". Archived from the original on 2021-11-10. Retrieved 2021-11-10.
- ^ Czubla, Albin (2020-12-04). "Główny Urząd Miar" (PDF). Główny Urząd Miar. Retrieved 2020-12-04.
- ^ "SANS 8601:2009 (Ed. 2.00)". SABS Webstore. Archived from the original on 2021-11-24. Retrieved 2021-11-24.
- ^ "SS-ISO 8601-1:2022". SIS Webstore. Retrieved 2023-10-06.
- ^ TS ISO 8601-1
- ^ TS ISO 8601-2
- ^ TCVN 6398-1:1998
External links
[edit]- ISO's catalog entry for ISO 8601-2:2019
- Use international date format (ISO) – Quality Web Tips by the World Wide Web Consortium (W3C)
- ISO 8601 summary by Dr. Markus Kuhn from Cambridge University
- Summary of 8601 by ISO at the Wayback Machine (archived 2011-06-14)
- The Mathematics of the ISO 8601 Calendar from the website of R.H. van Gent of Utrecht University
- RFC 3339 vs ISO 8601 — Venn diagram illustrating the difference between the two standards.
- ISO 8601 and computing differences between dates on Wikiversity
ISO 8601
View on GrokipediaHistory
Initial development
The International Organization for Standardization (ISO) established Technical Committee 154 (ISO/TC 154) in 1972 to develop standards for processes, data elements, and documents in commerce, industry, and administration, with a focus on supporting data interchange to enable reliable international communication.[7] This committee addressed the growing need for uniform representations of information in an era of expanding global trade and early computing systems, where varying national conventions for dates and times often led to errors in data processing.[7] By the mid-1970s, ISO/TC 154 had begun work on specific standards for temporal data, culminating in several preliminary documents that laid the groundwork for a comprehensive approach. Notable among these were ISO 2014:1976 for calendar dates, ISO 2711:1973 for ordinal dates, ISO 2015:1976 for week numbering, ISO 3307:1975 for time-of-day notations, and ISO 4031:1978 for time differentials, all aimed at providing consistent numeric formats for information interchange in business and technical applications.[8] These efforts were motivated by the recognition of ambiguities in cross-border data exchange, such as differing interpretations of date orders (e.g., month-day versus day-month), which could cause significant issues in computing, logistics, and international contracts.[8] The first edition of ISO 8601, titled Data elements and interchange formats — Information interchange — Representation of dates and times, was published in June 1988 after ISO/TC 154 unified and revised the earlier standards into a single, versatile framework.[9] This standard emphasized unambiguous, machine-readable formats to facilitate software portability and reduce errors in global systems, directly superseding the prior ISO documents.[8] A key feature adopted was the big-endian ordering for dates (year-month-day, or YYYY-MM-DD), influenced by established conventions like the American National Standards Institute's ANSI X3.30-1985, which promoted logical, sortable numeric representations such as YYYYMMDD for calendar dates in information systems.[10] This approach ensured that dates could be easily compared and processed without cultural biases, setting the foundation for subsequent refinements in the standard.Major revisions
The first major revision of ISO 8601 occurred in 2000 with the publication of the second edition, which addressed ambiguities in the 1988 baseline by enhancing the uniqueness and clarity of numeric representations for dates and times to prevent misinterpretation in international data exchange.[11] This edition refined rules for time zones, including better handling of differences from Coordinated Universal Time (UTC) and leap seconds, and incorporated the minor corrections from Technical Corrigendum 1 issued in 1991, which fixed typographical errors and formatting inconsistencies in basic date and time expressions without introducing new features.[12][13] The 2004 third edition built on these updates with further clarifications and expansions, notably adding support for decimal fractions in time representations to allow sub-second precision (e.g., 12:30:45.123 for hours, minutes, seconds, and milliseconds).[14] It refined time zone specifications for greater consistency, such as standardizing the use of offsets like +HH:MM, and formalized representations for recurring time intervals while maintaining compatibility with prior editions.[15] A structural overhaul came in 2019, when the standard was restructured and split into two parts: ISO 8601-1, focusing on fundamental elements like basic date, time, and duration representations, and ISO 8601-2, covering extensions for advanced use cases such as date ranges and irregular calendars.[2] This revision deprecated the basic (hyphenless) format in favor of the expanded format (e.g., 2025-11-08 over 20251108) for improved readability and removed reduced precision options, shifting them to extensions in Part 2 to streamline the core standard. Over 80% of ISO 8601-1 was rewritten, introducing more than 40 new terms and supporting features like individual time shifts (e.g., +08:00) while eliminating ambiguous concepts such as nominal month durations.[2]Recent updates
In January 2025, the International Organization for Standardization published Amendment 1 to ISO 8601-2:2019, titled "Canonical expressions, extensions to time scale components and date time arithmetic."[6] This amendment builds on the 2019 edition by introducing mechanisms to standardize and normalize representations of dates, times, and durations, ensuring greater consistency in information interchange. A central addition is the definition of a "canonical form" for date and time expressions, which mandates normalized time scale components, minimal underflow, and the absence of overflow to provide a unique, unambiguous representation.[16] Supporting this, new terms include "normalize," a process that adjusts time scale components to fall within specified ranges; "normalized duration," which applies this to durations including negative values; "overflow," denoting a positive excess that carries over to a higher unit (e.g., 90 minutes exceeding one hour); and "underflow," a negative value that can be adjusted upward by borrowing from a higher unit (e.g., -8 months equivalent to 4 months less than one year).[16] The amendment also establishes a new subclause on date-time arithmetic (14.5), focusing on handling overflow and underflow in computations.[16] For instance, the duration expression '1H90M' contains overflow because the 90 minutes can be normalized to 1 hour and 30 minutes, resulting in '2H30M'; in contrast, '1M90S' exhibits no overflow, as the minute-second pair lacks an unequivocal conversion to hours without additional context.[16] These enhancements promote reliable parsing and calculation of temporal data across systems, particularly in extended formats beyond the basic 2019 structure.Overview and principles
Purpose and scope
ISO 8601 is an international standard developed to provide unambiguous representations of dates, times, durations, and intervals, primarily for data interchange in computing, business, and scientific applications. Its core purpose is to minimize the risk of misinterpretation and confusion arising from diverse national conventions in date and time notation, ensuring consistent communication across systems and borders. By standardizing formats that are both machine-processable and human-recognizable, the standard facilitates reliable information exchange in contexts such as trade, transport, legal documentation, and technical data processing.[17][2] The scope of ISO 8601 encompasses representations of dates using the Gregorian calendar—including its proleptic extension for years prior to 1582—and times based on the 24-hour clock, often in relation to Coordinated Universal Time (UTC). It applies to character string formats suitable for textual and digital media, covering basic elements like calendar dates, week dates, ordinal dates, times of day, and composite date-time structures, as well as durations and intervals in parts 1 and 2 of the standard. However, it excludes representations from non-Gregorian calendars, such as astronomical or historical systems, and times not aligned with the 24-hour clock; it also does not specify character encoding methods.[17][18] Key limitations include its focus on numerical and symbolic notations without support for localized human-readable elements, such as month names or abbreviated forms intended for casual display. The standard assumes the proleptic Gregorian calendar for pre-modern dates, which may not align with historical Julian calendar usage before 1582, potentially requiring adjustments in specialized applications. ISO 8601 is endorsed by ISO Technical Committee 154 (ISO/TC 154) for processes, data elements, and documents in commerce, industry, and administration, and it has significantly influenced global standards, including the dateTime datatypes in XML Schema.[17][18][2]Basic formatting rules
ISO 8601 employs a big-endian ordering principle, where the largest temporal units precede smaller ones, such as year before month before day, to ensure chronological sorting and reduce ambiguity in international contexts.[1] This structure applies across date and time representations, starting with the year expressed as a four-digit number (YYYY), followed by month (MM), day (DD), hour (hh), minute (mm), and second (ss).[4] The standard defines two formats: the basic format, which omits separators for compactness (e.g., YYYYMMDD), and the extended format, which includes separators for enhanced readability and is preferred for new applications.[19] Hyphens (-) serve as separators between date components in the extended format (e.g., YYYY-MM-DD), while colons (:) separate time components (e.g., hh:mm:ss); the character 'T' denotes the transition from date to time (e.g., YYYY-MM-DDThh:mm:ss).[1] Although the basic format remains permissible, the 2019 edition emphasizes the extended format to promote clarity and machine readability.[1] Fields maintain fixed widths with leading zeros for values less than 10, ensuring consistent parsing (e.g., month as 09 rather than 9, resulting in 2025-09-08).[4] Precision is adjustable by truncating trailing components, but representations must remain complete and unambiguous within their scope; for instance, fractional seconds follow a decimal point (e.g., ss.sss), with the number of digits specified by the application.[19] This approach avoids regional variations, such as MM/DD versus DD/MM, by enforcing a single, internationally neutral syntax.[20]Date representations
Years
In ISO 8601, years are represented using a four-digit numeric format denoted as [YYYY], where each Y is a digit from 0 to 9, supporting the range from 0000 to 9999.[1] This format applies the proleptic Gregorian calendar for years prior to 1582, extending the modern Gregorian rules backward without adjustments for historical calendar transitions, provided all parties agree on its use.[21] Leading zeros are required for years with fewer than four digits to maintain fixed width, such as 0047 for AD 47.[21] To distinguish eras, an optional sign prefix may precede the year: a plus sign (+) for positive years (AD/CE, default without prefix for 0001–9999) and a minus sign (–) for negative years (BC/BCE).[21] The year 0000 serves as a placeholder equivalent to 1 BC, while subsequent BC years are negative offsets from this point—for example, 2 BC is represented as –0001, and 47 BC as –0046.[21] Century abbreviations, such as "19" for the 1900s, are explicitly prohibited to avoid ambiguity.[21] For years outside the 0000–9999 range, ISO 8601 supports expanded representations with a mandatory sign prefix followed by additional digits, typically six for years up to ±999999 (e.g., +123456 for AD 123456 or –012345 for 12346 BC).[21] The exact number of extra digits must be agreed upon by the communicating parties to ensure compatibility, allowing representation of very distant historical or future dates while adhering to the standard's principles of clarity and unambiguity.[21] These year formats integrate into broader date strings, such as calendar dates, by placing the year as the leading component.[1]Calendar dates
The calendar date representation in ISO 8601 uses the Gregorian calendar and specifies a numerical format for expressing dates in the order of year, month, and day.[22] This format ensures unambiguous interchange of date information across systems and regions.[1] The extended format is YYYY-MM-DD, where YYYY represents the four-digit year, MM the two-digit month (padded with leading zero if necessary), and DD the two-digit day (padded with leading zero if necessary), separated by hyphens.[22] The basic format is YYYYMMDD, without separators, providing a compact alternative for contexts where readability is secondary to brevity.[22] For example, April 12, 1985, is represented as 1985-04-12 in extended format or 19850412 in basic format.[22] The year component spans from 0000 to 9999, using four digits to accommodate a wide historical and future range.[22] The month ranges from 01 (January) to 12 (December), and the day from 01 to 31, adjusted according to the month's length and whether the year is a leap year.[22] A leap year, which includes February 29, occurs if the year is divisible by 4, but not if divisible by 100 unless also divisible by 400; for instance, 2024 is a leap year (2024-02-29 is valid), while 1900 is not.[22] Date validation is implicit in the standard, requiring adherence to Gregorian calendar rules; invalid combinations, such as 2025-04-31 (April has only 30 days), are not permitted and must be rejected by implementations.[22] The proleptic Gregorian calendar applies for dates before 1582, though usage prior to that point requires explicit agreement among parties.[22]Week dates
The ISO 8601 standard defines a week date representation that expresses dates in terms of the year, week number, and weekday, facilitating consistent scheduling across international contexts where the week serves as a fundamental unit. This system aligns with the Gregorian calendar but prioritizes weeks starting on Monday, making it distinct from month-based notations.[5][23] The format for week dates uses the extended representation YYYY-Www-D, where YYYY denotes the four-digit week year, Www is the two-digit week number (with a leading zero for weeks 01 through 09) prefixed by "W", and D specifies the weekday from 1 (Monday) to 7 (Sunday). The basic format omits the hyphens, resulting in YYYYWWWD. For instance, 2025-W45-1 corresponds to the Monday of week 45 in the 2025 ISO year. Reduced precision formats, such as YYYY-Www for the entire week, are also permitted.[5][24][23] Weeks in this system commence on Monday and conclude on Sunday, with week numbers ranging from 01 to 52 or 53. Week 01 is specifically the week that includes the first Thursday of the calendar year, ensuring it contains the majority (at least four) days of that year. This rule accounts for variations at year boundaries: if January 1 falls between Monday and Thursday, it belongs to the current year's week 01; otherwise, it may fall into the prior year's week 52 or 53. Days are numbered sequentially within the week, with Monday as 1 and Sunday as 7.[24][5][23] The ISO week year for a given date is determined by the calendar year that contains the Thursday of the week to which the date belongs, thereby assigning the date to the year encompassing the majority of its week's days. Consequently, dates near the end of December or beginning of January may shift to an adjacent ISO year; for example, December 31, 2006, which is a Sunday, is designated as 2006-W52-7, remaining within its calendar year. In contrast, December 31, 2024, a Tuesday, falls under 2025-W01-2 due to the year boundary shift. This assignment prevents weeks from being split across years in a way that disrupts the Thursday-centric numbering.[5][24][23] Most years contain 52 weeks, but 53-week years occur approximately every five to six years when the Gregorian year starts on a Thursday or, in leap years, on a Wednesday, resulting in 371 days aligned with 53 full weeks. Examples include 2015 (53 weeks, starting December 29, 2014) and 2026 (53 weeks, with week 53 spanning December 28, 2026, to January 3, 2027). These extended years ensure complete coverage without fractional weeks.[24][5][23]Ordinal dates
Ordinal dates in ISO 8601 provide a representation of a specific day by combining the calendar year with the ordinal day number within that year, facilitating sequential and unambiguous date interchange without reference to months or weeks.[22] This format is defined in clause 5.2.3 of ISO 8601-1:2019, where the day number ranges from 001 to 365 in common years or 001 to 366 in leap years.[22] The representation supports both basic and extended formats. In the basic format, it consists of a four-digit year followed immediately by a three-digit day number, such as2019054 for February 23, 2019.[22] The extended format inserts a hyphen separator, yielding YYYY-DDD, as in 2019-054 for the same date.[22] Leading zeros are required for the day number to ensure fixed-width parsing, and years from 0000 to 9999 are represented with four digits, padding with zeros as needed for years below 1000.[22]
Leap years, which include day 366, follow the Gregorian calendar rule: a year is a leap year if divisible by 4, but not by 100 unless also by 400.[22] For example, 2024-060 corresponds to February 29, 2024, in a leap year, while 2025-060 represents March 1, 2025, in a common year.[22]
This format is particularly useful for sequential logging and computations where day-of-year progression is prioritized over calendar structure, such as in software data interchange, clinical trial metadata via CDISC standards, and machine-generated timestamps in computing environments like SAS.[25] Conversion to calendar dates assumes the proleptic Gregorian calendar, but extracting month and day components requires additional calculation since they are not explicitly encoded.[22]
Time representations
Time of day
The time of day in ISO 8601 employs the 24-hour clock system to denote clock time independently of any date or time zone. This representation focuses on hours, minutes, and seconds as fundamental components, ensuring unambiguous numerical interchange.[22] The standard specifies two formats for complete time of day expressions: the basic format without separators (HHMMSS) and the extended format with colons (HH:MM:SS). Hours (HH) are two digits ranging from 00 to 23, minutes (MM) from 00 to 59, and seconds (SS) from 00 to 59. For instance, 143022 or14:30:22 indicates 2:30:22 p.m. This structure prioritizes the extended format for human readability while allowing the basic format for compact data transmission.[22]
To achieve sub-second precision, a decimal fraction may follow the seconds, separated by a period or comma (e.g., 14:30:00.5 for half a second past 2:30 p.m.), with up to nine digits permitted for high-resolution applications such as scientific measurements. Midnight, marking the start of a day, is represented as 00:00:00, while noon is 12:00:00. These designations avoid ambiguity in the 24-hour system, where 00:00:00 distinctly differs from 24:00:00, the latter reserved for interval endpoints.[26][22]
For reduced precision, trailing components can be omitted when the intent is clear, such as 14:30 implying 14:30:00, though the complete form is recommended to prevent misinterpretation. Trailing zeros within components or fractions are optional but should be included in full representations for consistency; for example, 14:30:00.500 may be shortened to 14:30:00.5 without loss of meaning. This flexibility supports varied use cases while maintaining the standard's emphasis on precision and portability.[22]
Local time
In ISO 8601, local time is designated by the absence of any timezone suffix or offset in the time representation, implying the time in the local timezone of the context in which it is used.[17] For instance, the combined date and time format2025-11-08T14:30:00 represents 2:30 PM on November 8, 2025, in the unspecified local timezone without further qualification.[19] This unqualified form relies on the recipient or system interpreting the time relative to its own local timezone, making it suitable for internal applications where the timezone is implicitly known.[27]
The standard explicitly warns against using unqualified local time for international data interchange, as it introduces ambiguity due to varying local timezones and potential misinterpretation across borders.[17] Profiles of ISO 8601, such as RFC 3339 for internet protocols, strongly discourage this format altogether, recommending explicit UTC offsets or the "Z" designator to ensure interoperability, since local time can lead to errors in approximately 23 out of 24 global timezones without synchronization mechanisms like NTP.[28] Instead, the standard advises including a timezone offset (e.g., ±HH:MM) whenever the timestamp may be shared beyond a single localized system.[17]
Unqualified local time finds appropriate use in scenarios where the timezone is inherently implied, such as system logs on a specific device or internal records within a single organization operating in a uniform timezone.[19] For example, a server's event log might record 2025-11-08T14:30:00 to denote an action at that local hour, assuming all readers share the same timezone context.[27] This approach simplifies notation in controlled environments but requires clear documentation of the assumed timezone to prevent errors.
Local time differs from Coordinated Universal Time (UTC) by a variable offset known as the time shift, which depends on the geographic location and can fluctuate due to daylight saving time adjustments or other regional policies.[17] For instance, the same instant might be 14:30:00 local in one zone but 13:30:00Z in UTC, with the offset changing seasonally in areas observing daylight saving (e.g., from -05:00 to -04:00 in parts of North America).[19] This variability underscores the need for caution in using local representations, as conversions to UTC require knowledge of the specific timezone rules at the given date and location.[28]
Coordinated Universal Time
In ISO 8601, Coordinated Universal Time (UTC) is designated by appending the uppercase letter 'Z' (without any preceding separator) immediately after the time of day representation, signifying that the specified time is expressed in UTC rather than a local time zone.[26] This 'Z' suffix, derived from the phonetic alphabet designation for 'Zulu', serves as the UTC indicator and is equivalent to Greenwich Mean Time (GMT) in practical contexts, though UTC is the more precise atomic-based standard.[4] For example, the full date and time "2025-11-08T14:30:00Z" represents exactly 2:30 PM UTC on November 8, 2025, providing a unambiguous global reference point.[29] The precision of UTC in ISO 8601 aligns with the basic time of day components, supporting representations from hours alone (e.g., "14Z") up to hours, minutes, seconds, and decimal fractions (e.g., "14:30:00.5Z"), always denoting an absolute instant independent of geographic location.[26] These formats ensure machine-readable consistency while maintaining human interpretability, with the time elements following the 24-hour clock structure outlined in the standard's time representations.[1] UTC relates to International Atomic Time (TAI) by matching its uniform rate exactly but differing by an integer number of leap seconds to align with Earth's irregular rotation, expressed as UTC = TAI minus the accumulated leap seconds (currently 37 seconds as of 2025).[30] In ISO 8601 formatting, leap seconds are generally ignored in standard representations—using second values from 00 to 59—but the standard permits the value 60 to denote a positive leap second when necessary (e.g., "23:59:60Z").[26] Due to its universality, UTC with the 'Z' suffix is the preferred format for global timestamps in technical protocols and systems, including HTTP headers and internet standards, where RFC 3339—a restricted profile of ISO 8601—mandates its use to facilitate unambiguous time synchronization across distributed networks.[29] This adoption ensures reliable interoperability in applications ranging from web services to aviation, minimizing errors from time zone ambiguities.[20]Time offsets from UTC
Time offsets from UTC in ISO 8601 specify the difference between local time and Coordinated Universal Time (UTC), allowing representation of times in various time zones. These offsets are appended to the time of day component in a combined date-time representation, ensuring unambiguous interpretation across different regions.[29] The standard format for a time offset is a signed numeric value in the form ±hh:mm, where hh represents hours (00 to 23) and mm represents minutes (00 to 59); the minutes component may be omitted if it is zero, resulting in ±hh. For example, the Pacific Standard Time (PST) offset is denoted as -08:00, yielding a full timestamp like 2025-11-08T14:30:00-08:00. Positive offsets indicate time zones east of UTC (local time ahead), while negative offsets indicate those west (local time behind).[4][29] Offsets range from ±00:00 (no difference) to ±23:59, covering all practical time zone differences observed globally. The offset +00:00 is equivalently represented by the letter Z, signifying UTC directly, as in 2025-11-08T14:30:00Z. An example of a positive offset is +01:00 for Central European Time (CET).[4][29] ISO 8601 requires that offsets be constant within a given representation, reflecting a fixed difference without incorporating variable factors such as daylight saving time adjustments; any such changes must be handled separately, often through distinct offset values or external indicators.[4][29]Combined date and time
Basic format
The combined date and time representation in ISO 8601 links a calendar date with a time of day using the uppercase letter 'T' as a separator, forming a single string that unambiguously conveys both elements without requiring additional delimiters.[1] This structure follows the order of date components first—year, month, and day—followed by the time components of hour, minute, and second, adhering to the standard's rule of decreasing significance from left to right for consistent machine processing.[26] For instance, the extended format uses hyphens in the date and colons in the time, as in2025-11-08T14:30:00, while the basic format omits these separators for compactness, resulting in 20251108T143000.[19]
This design prioritizes readability and interoperability, allowing the full representation to encode precise moments in a format that sorts chronologically when treated as lexicographic strings, a property inherent to the big-endian ordering of components.[26] Precision can be adjusted by truncating lower-order elements; for combined date and time, the complete form includes all components up to seconds, but lower components like seconds can be omitted for reduced accuracy, such as 2025-11-08T14:30. For higher precision, fractional seconds may be included after the seconds component, such as 2025-11-08T14:30:00.123; trailing zeros in fractions may be omitted.[1][23] While date and time components themselves follow their respective rules (e.g., four-digit years and 24-hour notation), the 'T' separator ensures the combined string remains distinct from standalone date or time expressions.[19]
Time zone inclusion
In ISO 8601, time zone information is incorporated into combined date and time representations by appending a time zone designator immediately after the time component, ensuring unambiguous interpretation across different locations.[20][28] The designator can indicate Coordinated Universal Time (UTC) using the suffix "Z", or specify a local time offset from UTC in the form ±HH:MM, where HH represents hours and MM represents minutes; seconds may be included in extended representations (e.g., ±HH:MM:SS).[28] For instance, the representation 2025-11-08T14:30:00Z denotes 2:30 PM UTC on November 8, 2025.[20] Similarly, 2025-11-08T06:30:00+08:00 represents 6:30 AM local time in Beijing, which is 8 hours ahead of UTC.[28] The offset follows the time component without any intervening space or separator, maintaining the compact structure of the combined format.[28] Positive offsets (+HH:MM) indicate time ahead of UTC, while negative offsets (-HH:MM) indicate time behind UTC.[28] This direct appending avoids ambiguity in international data exchange.[20] Although ISO 8601 permits representations without a time zone designator to imply local time, this variant is strongly discouraged for interchange purposes due to potential interoperability issues, as recipients may interpret it using their own local offset.[28] Instead, explicit UTC or offset inclusion is recommended to ensure precision and consistency.[4]Durations
Format components
The ISO 8601 standard specifies durations, also known as periods, using a structured format that begins with the prefix "P" to designate a period of time.[1] This prefix is mandatory and is followed by one or more components representing units of time, allowing for precise expression of intervals in date, time, or combined forms.[31] The format supports both calendar-based components (years, months, days) and time-of-day components (hours, minutes, seconds), separated by the "T" designator when both are present.[32] Key components include "Y" for years, "M" for months (when before "T"), "D" for days, "H" for hours (after "T"), "M" for minutes (after "T"), and "S" for seconds (after "T").[1] The "M" designator is context-dependent: it represents months in the date portion (before "T") and minutes in the time portion (after "T").[33] Components with zero value are omitted and must appear in order of descending magnitude: years (Y), months (M), days (D) in the date portion before "T", and hours (H), minutes (M), seconds (S) in the time portion after "T". For example, a duration of one year, two months, three days, four hours, five minutes, and six seconds is represented asP1Y2M3DT4H5M6S.[31]
Durations can mix date and time elements, with "T" serving as the required separator between them; omitting "T" indicates a date-only duration.[32] For pure time durations without date components, the format starts with "PT" followed by time elements, such as PT4H5M6S for four hours, five minutes, and six seconds.[33] Decimal fractions are permitted on the lowest-order component present, typically seconds, to express sub-unit precision; these use a decimal sign (comma or full stop) followed by one or more digits. For instance, PT1.5S denotes one and a half seconds.[1]
The "P" prefix distinguishes durations from other ISO 8601 representations and is always required, though in some implementation contexts (e.g., certain programming libraries), pure time durations may be parsed without it if the surrounding format is unambiguous; however, adherence to the standard mandates its inclusion for interoperability.[32] Zero-padding is not required for components, but leading zeros in fractional parts ensure consistent parsing.[31]
Calculation rules
The calculation of durations in ISO 8601 involves applying arithmetic operations to date-time expressions, as specified in the extensions provided by ISO 8601-2:2019/Amd 1:2025.[3][6] These operations allow for the addition or subtraction of a duration to or from a date or time, modifying the original expression according to calendar rules. The 2025 amendment further refines these rules with concepts such as normalised durations and handling of overflow/underflow in arithmetic operations (see Extensions section for details). Durations are expressed in the format defined in ISO 8601-1:2019, starting with "P" followed by components such as years (Y), months (M), days (D), and time elements after "T".[1] Units within durations are categorized as fixed or non-fixed. Fixed units, such as days, hours, minutes, and seconds, have constant lengths (e.g., 1 day always equals 24 hours). Non-fixed units, specifically months and years, vary in length depending on the calendar context; for example, a month can range from 28 to 31 days, and a year from 365 to 366 days in the Gregorian calendar. When adding a duration containing non-fixed units to a date-time, the result adjusts to the corresponding calendar position, clipping to the last valid day if necessary. A representative case is adding P1M (one month) to 2025-01-31, which yields 2025-02-28, as February 2025 has only 28 days; in a leap year like 2024, the same addition to 2024-01-31 would yield 2024-02-29. This ensures the resulting date remains valid within the calendar structure.[3][6] Subtraction operates inversely, where end date minus start date approximates the duration, particularly for non-fixed units, by determining the calendar difference and expressing it in the largest possible units first (e.g., years then months). For instance, the duration from 2025-01-31 to 2025-02-28 approximates to P1M, accounting for the variable month length without exceeding the end date. Negative durations can also be used directly for subtraction, following the same addition principles but in reverse. These approximations prioritize calendar alignment over exact temporal intervals, as variable units do not map precisely to fixed time scales.[3][6] Decimal fractions in durations enhance precision and accumulate across units during calculations. For example, P1.5D represents 1 day plus 0.5 days, equivalent to 36 hours when added to a time expression, carrying over to the hour component as needed (e.g., 2025-01-01T00:00 + P1.5D = 2025-01-02T12:00). This accumulation applies similarly to other components, such as P0.5H equaling 30 minutes, ensuring sub-unit precision is preserved in the result without loss.[3][6]Intervals
Start-end format
The start-end format in ISO 8601 represents a time interval by specifying explicit start and end points separated by a solidus (/), allowing for precise delineation of bounded periods using date or datetime representations. This format adheres to the basic or extended forms defined for dates and times, ensuring unambiguous exchange of interval data. For instance, a simple date-only interval from November 8, 2025, to November 15, 2025, is expressed as2025-11-08/2025-11-15.[1]
When incorporating time components, the format extends to full datetime strings, combining the date-time separator 'T' with optional seconds and fractional precision for greater granularity. An example is 2025-11-08T00:00:00/2025-11-15T23:59:59, which denotes the full calendar days from midnight on the start date to the end of the end date. This aligns with the combined date and time rules in the standard, where the 'T' separator links the date and time portions without ambiguity. Time designations follow the 24-hour clock, and the representation includes the limiting instants (start and end points) unless specified otherwise by the application.[1]
Open-ended intervals, which extend infinitely in one direction, are supported by using ".." to denote the unbounded component after the solidus. A start-open interval beginning indefinitely before a specified end is written as ../2025-11-15, while an end-open interval starting at a point and continuing forever is 2025-11-08/... These notations indicate unbounded extents, useful for historical or future-projection scenarios, and are part of the enhanced representations in the standard.[1]
Time zone information must be consistent across the start and end points to avoid ambiguity; if present in the start, it applies to the end unless explicitly overridden with a separate offset or UTC designator (Z). For example, 2025-11-08T00:00:00Z/2025-11-15T23:59:59+01:00 specifies the start in UTC and the end in a +1 hour offset, but implementations should ensure logical coherence, such as matching zones for the same instant. Offsets use the format ±hh:mm, and the standard recommends specifying zones for intervals spanning time zone changes to maintain accuracy.[1]
Duration-based format
The duration-based format in ISO 8601 specifies a time interval by combining a start point with a duration, denoted as<start>/<duration>. This representation identifies the interval's beginning and length, allowing the end point to be derived computationally. The start must be a complete representation of a date and/or time, using either the basic or extended format, while the duration follows the standard duration notation.[17]
To calculate the end of the interval, the duration is added to the start point, adhering to the rules for duration arithmetic in the Gregorian calendar and proleptic extensions where applicable. This addition accounts for variable elements such as month lengths, leap years, and time zone considerations if the start includes time-of-day. For instance, the interval 2025-11-08/P7D begins on November 8, 2025, and extends seven days, ending on November 15, 2025. Similarly, 2025-01-01/P1Y denotes an annual period starting January 1, 2025, and ending December 31, 2025, assuming a non-leap year.[17][1]
Constraints on this format ensure unambiguity and consistency: the duration must be positive (non-negative values are not permitted for intervals), and the representation must maintain uniform basic or extended formatting throughout. There is no provision for an end/duration form, as the standard emphasizes start-based derivations to avoid redundancy. Durations are expressed using the designator P followed by numeric values and units (e.g., P1Y for one year), with optional decimal fractions for sub-unit precision.[17]
Repeating intervals
Repeating intervals in ISO 8601 are defined in ISO 8601-2:2019 as extensions to the basic interval representations in ISO 8601-1:2019, allowing for the specification of periodic events or schedules. The format begins with the "R" designator, optionally followed by a count of repetitions (n), a solidus (/), and then a time interval, which can be expressed as a start point followed by an end point or a duration. If the count n is omitted, the repetition is considered indefinite or unbounded. The 2025 amendment to ISO 8601-2 further refines date-time arithmetic for these representations.[3][6] The basic structure for repeating intervals follows the general form R/R4/2025-11-08/P1W, indicating repetitions at weekly intervals from the start date. Similarly, an indefinite weekly repetition beginning on the same date uses R/2025-11-08/P1W. The "R" serves as a clear delimiter separating the repetition specifier from the underlying interval, facilitating unambiguous parsing in implementations. These representations assume consecutive intervals unless modified by additional rules, with durations calculated according to the rules in ISO 8601-1 for calendar-based or time-based components.R/2025-W01/P1W denotes indefinite weekly repetitions starting from the first week of 2025, leveraging week-date formats for alignment with calendar weeks. Advanced rules may include frequency modifiers (e.g., FREQ=MO for monthly) and by-selectors (e.g., BYDAY for specific days of the week), but only one frequency type is permitted per rule, applied in a hierarchical order from coarser to finer units. This extension supports applications requiring precise scheduling, such as event calendars, while maintaining compatibility with basic ISO 8601-1 intervals.[3]
Deprecated features
Truncated representations
Truncated representations in ISO 8601 refer to shortened forms of date and time expressions where leading components are omitted, allowing for reduced precision by agreement in specific applications.[3] These formats were permitted in earlier editions of the standard, such as ISO 8601:2000, but introduced potential ambiguities that complicated unambiguous interchange.[1] In the 2019 revision, truncated representations were removed from the core rules of ISO 8601-1:2019, which now mandates complete representations for basic dates and times, with reduced precision limited to omitting trailing components (e.g., "2025-11").[1] Instead, features for uncertain, approximate, or incomplete data—such as unspecified digits—are provided in ISO 8601-2:2019 as optional extensions, using placeholders like 'X' for omitted digits (e.g., "19XX-12" for an approximate December in the 1990s). Legacy forms like "99-12" (two-digit year and month) or "-11-08" (month and day without year) from earlier editions are deprecated and not directly supported in the 2019 extensions.[3][34] A primary issue with legacy truncated forms is ambiguity, particularly regarding the century for two-digit years; for instance, "25-01-01" could imply January 1, 1925, or January 1, 2025, depending on context, leading to misinterpretation in global data exchange.[35] Additionally, basic formats like "202512" (intended as YYYYMM for December 2025) risk confusion with truncated six-digit forms like "251220" (YYMMDD for December 20, 2025), prompting the 2019 standard to prohibit such overlaps in core representations.[35] Despite their deprecation in the core standard, truncated representations remain in legacy use for backward compatibility in various software systems and protocols, where full adoption of expanded formats might disrupt existing implementations.[35]Omitted components
In ISO 8601, omitted components refer to the omission of trailing, zero-valued elements in date and time representations to denote reduced precision while implying that the absent parts are zero. This feature allows for more concise formats in contexts where full detail is unnecessary, such as specifying only the year and month without the day. For example, the representation "2025-11" indicates November 2025, with the day, time, and lower elements implicitly set to zero (equivalent to 2025-11-01T00:00:00).[1] Similarly, in time representations, "14:30" omits seconds and any fractional parts, meaning 14:30:00 exactly.[1] The rule for such omissions requires that they occur only at the end of the representation and that the context unambiguously supports the implied zeros to avoid ambiguity. Representations with reduced precision by omitting trailing components have been part of the basic formats since earlier versions and are retained in ISO 8601-1:2019 (Clause 5.2.2.2). ISO 8601-2:2019 extends this with additional mechanisms for more complex omissions or uncertainties, such as unspecified digits anywhere in the representation. Implementers are advised to use complete representations where precision is critical, with reduced precision suitable for contexts where the implied zeros are clear. This approach ensures compatibility while emphasizing context-aware parsing, where the precision is determined by the last explicitly stated element.[3]Extensions
Extended Date/Time Format (EDTF)
The Extended Date/Time Format (EDTF) is a standardized extension to ISO 8601 designed to represent dates and times with greater flexibility, particularly for expressing uncertainty, approximation, and ambiguity in cultural heritage materials. Developed by the Library of Congress in collaboration with bibliographic and related communities between 2011 and 2013, EDTF addresses limitations in ISO 8601 for handling imprecise historical dates, such as those found in manuscripts, photographs, and archival records. A draft specification was published in 2012, with the format finalized and officially documented by 2019 to support interoperability in digital libraries and metadata systems.[36] EDTF is structured in three levels of compliance to balance simplicity and expressiveness. Levels 0 and 1 are fully compliant with core ISO 8601 formats, ensuring basic date-time representations like1985-04-12 for April 12, 1985. Level 2 introduces extended features beyond ISO 8601, allowing for more nuanced encodings suitable for specialized applications. This tiered approach enables systems to parse EDTF strings progressively, starting from standard ISO 8601 and adding support for advanced qualifiers as needed.[37]
Key features of EDTF focus on approximate and fuzzy dates, using symbolic modifiers to indicate uncertainty or imprecision without altering the base ISO 8601 structure. The question mark (?) denotes uncertainty, as in 1984? for a year that is not definitively confirmed. The tilde (~) signifies approximation, such as 1984-06~ for roughly June 1984. The percent sign (%) combines both uncertainty and approximation, exemplified by 2004-06-11% for an imprecise date around June 11, 2004. Additionally, X represents unspecified digits, enabling representations like [198?] for an uncertain year in the 1980s or 20XX for any year in the 2000s. These modifiers can apply to individual components, such as 1984-06~/1984-07~ to indicate a date spanning approximately June or July 1984.[37]
EDTF integrates seamlessly with ISO 8601 by building on its extended format—requiring hyphens between date components and colons between time components—while introducing specific additions for enhanced expressivity. It employs the forward slash (/) for closed intervals, extending core ISO 8601 interval notations, as in 1964/2008 for the period from 1964 to 2008. The tilde (~) and double period (..) further support open-ended approximations, like 2003-12~ for circa December 2003. This compatibility allows EDTF to function as a superset, facilitating adoption in environments already using ISO 8601 without requiring wholesale format changes.[37]
ISO 8601-2 extensions
ISO 8601-2:2019 specifies extensions to the basic representations defined in ISO 8601-1:2019, focusing on advanced elements for dates and times in the Gregorian calendar using the 24-hour clock. These extensions address non-core aspects such as uncertainty, approximation, and complex interval structures, enabling more precise interchange of date and time information in scenarios where basic formats are insufficient. The standard excludes representations from non-Gregorian calendars or non-24-hour time systems, ensuring compatibility with the core principles of ISO 8601-1 while providing tools for sophisticated applications like scheduling and historical data handling.[3] Key extensions include mechanisms for denoting uncertain or approximate dates, where symbols like "?" indicate uncertainty (e.g., an uncertain year as "1985?"), "~" signifies approximation, and "%" combines both for elements that are either uncertain or approximate. Extended time intervals support open or unknown endpoints, such as "1985-01../" for a range starting January 1985 with an unspecified end, allowing flexible representation of ongoing or partial periods. Repeat rules enable the definition of recurring events, incorporating start instants, durations, and selection criteria for movable dates like the fourth Thursday in November (Thanksgiving in the US). These features complement ISO 8601-1 by expanding recurring interval notations to include pattern-based repetitions, essential for calendar systems and automated processing.[3][34] Additional extensions cover divisions of the year, such as quarters (e.g., "Q1" for the first quarter) and seasons, as well as sets and choices of dates or times for grouped representations. Ordinal date formats are enhanced, permitting day-of-year designations like "2023-365" for December 31, 2023, and day-of-week notations for relative positioning. Arithmetic operations on dates and times, including addition and subtraction of durations, are also formalized to support computational tasks while maintaining unambiguous interchange. Together, these elements ensure full compliance in complex systems requiring nuanced temporal data, such as enterprise software or international standards protocols.[3] For instance, a repeating yearly event starting January 1, 2023, could be expressed as "R/2023-01-01/P1Y", where "R" denotes repetition, the start date follows, and "P1Y" is the duration of one year. An uncertain full date might appear as "2023-??-??", indicating the year is known but month and day are unspecified. These examples illustrate the standard's emphasis on clarity and extensibility without altering the foundational YYYY-MM-DD format.[3]2025 amendment updates
The 2025 amendment to ISO 8601-2, formally designated as ISO 8601-2:2019/Amd 1:2025 and published in January 2025, introduces key enhancements to the extensions defined in the base standard, emphasizing improved precision and interoperability in date and time representations.[6] These updates address ambiguities in parsing and computation, particularly for complex data exchanges in digital systems. A primary addition is the specification of canonical expressions, which provide strict, normalized formats for dates, times, durations, and intervals to ensure unambiguous parsing.[6] Canonical forms require minimal underflow and no overflow in time scale components, with a normalization process that adjusts values to standard ranges—such as converting an overflowing duration like '1H90M' to '2H30M'.[16] This aligns with strict JSON-compatible formats by mandating full expansions, including separators and time zone indicators, exemplified by the date-time stringYYYY-MM-DDTHH:MM:SSZ for UTC times, eliminating optional abbreviations or truncations that could lead to interpretation errors.[6]
Further extensions to time scale components allow for finer granularity in durations and intervals, incorporating date-time arithmetic for operations like addition and subtraction while preserving normalization.[6] Underflow is defined for negative components combinable with non-negative higher-order units, such as adjusting '-8M' relative to a year, ensuring consistent results across implementations.[16]
These changes collectively improve data handling in AI/ML applications and web APIs by promoting machine-readable, error-free formats that reduce parsing overhead and enhance cross-system compatibility.[6]
