ISO 8601

From Bharatpedia, an open encyclopedia


Current date and time expressed according to ISO 8601 [refresh]
Date in UTC2025-03-03
Time in UTC15:08:38Z
T150838Z
Date and time in UTC2025-03-03T15:08:38Z
20250303T150838Z
Date and time with the offset2025-03-03T03:08:38−12:00 UTC−12:00 [refresh]

2025-03-03T15:08:38+00:00 UTC+00:00 [refresh]

2025-03-04T03:08:38+12:00 UTC+12:00 [refresh]
Week2025-W10
Week with weekday2025-W10-1
Ordinal date2025‐062

Template:Time sidebar


ISO 8601 is a global standard that facilitates the exchange and communication of date and time-related information across the world. Developed and maintained by the International Organisation for Standardisation (ISO), it was initially published in 1988, with subsequent updates in 1991, 2000, 2004, and 2019, along with an amendment introduced in 2022. This standard offers a clear and precise method for representing calendar dates and times, aiming to prevent misinterpretation of numeric dates and times when data is shared among countries that follow different conventions.

The ISO 8601 standard encompasses various representations and formats, including dates in the Gregorian calendar (as well as the proleptic Gregorian calendar), times based on a 24-hour clock with an optional UTC offset, time intervals, and combinations of these elements. Importantly, the standard does not assign specific meanings to any components of the dates or times; their interpretation relies on the context in which they are used. Additionally, representations must avoid terms that lack a defined numerical meaning within the standard (such as references to years in the Chinese calendar) or that do not consist of computer characters (therefore excluding images or sounds).

In accordance with the ISO 8601 interchange standard, dates and times are organized so that the largest temporal unit (usually the year) appears first on the left, followed by each smaller unit to the right. These representations must utilize Arabic numerals and specific computer characters (like "‐", ":", "T", "W", "Z") that have designated meanings within the standard. Consequently, common descriptors such as "January," "Thursday," or "New Year's Day" are not permitted in interchange representations under this standard.

History[edit]

The first version of the ISO 8601 standard, known as ISO 8601:1988, was released in 1988. This edition brought together and replaced several older ISO standards related to date and time notation, including ISO 2014, ISO 2015, ISO 2711, ISO 3307, and ISO 4031. It was later succeeded by ISO 8601:2000, the second edition published in 2000, followed by the third edition, ISO 8601:2004, which came out on 1 December 2004. The standard underwent further revisions with ISO 8601-1:2019 and ISO 8601-2:2019, both released on 25 February 2019. The development and maintenance of ISO 8601 fall under the purview of ISO Technical Committee TC 154.

ISO 2014, although now outdated, was the initial standard that introduced all-numeric date formatting in a most-to-least-significant order as [YYYY]-[MM]-[DD]. The ISO week numbering system was established in ISO 2015, while the identification of days using ordinal dates was originally outlined in ISO 2711. The fourth revision, ISO 8601-1:2019, published in February 2019, includes slight updates from the previous ISO 8601:2004 standard. In contrast, the new ISO 8601-2:2019 introduces various extensions, such as provisions for uncertainties and components of the Extended Date/Time Format (EDTF).

An amendment released in October 2022 provided minor technical clarifications and sought to eliminate ambiguities in the definitions. Notably, one of the most significant updates was the reinstatement of the "24:00:00" format, which denotes the exact moment at the end of a calendar day.

History of published editions and amendments
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

General principles[edit]

  • In the ISO 8601 standard, date and time values are arranged hierarchically from the largest to the smallest unit: year, month (or week), day, hour, minute, second, and fraction of a second. This lexicographical ordering aligns with chronological order, except in cases where negative years or time offsets are involved, allowing for natural sorting of dates, which is particularly useful in systems like file management.
  • Each date and time entry must maintain a consistent number of digits, requiring the use of leading zeros where necessary.
  • Representations can be formatted in one of two ways: a basic format that minimises the use of separators, or an extended format that includes separators for improved readability. The standard emphasises that "The basic format should be avoided in plain text." In this context, hyphens serve as separators between date components (year, month, week, and day), while colons separate time components (hours, minutes, and seconds). For instance, the sixth day of January in the year 2009 can be represented as "2009-01-06" in the extended format or simply as "20090106" in the basic format without any confusion.
  • To accommodate reduced precision, any number of components may be omitted from date and time representations, but this omission should occur starting from the least significant to the most significant. For example, "2004-05" is a valid ISO 8601 date, indicating May (the fifth month) of 2004. This representation will not imply the 5th day of an unspecified month in 2004, nor will it suggest a time span that extends into 2005.
  • Additionally, if required for specific applications, the standard allows for the inclusion of a decimal fraction to indicate the smallest time unit within the representation.

Dates[edit]

Template:ISOCALENDAR

The ISO 8601 standard is based on the Gregorian calendar, recognised as “the international standard for civil use”.[1]

This standard permits the use of Gregorian dates starting from the calendar's introduction on 15 October 1582. For dates prior to this (pre-Gregorian), the calendar can be extended back in time (using the proleptic Gregorian calendar) if there is explicit agreement between the parties involved. However, it is important to note that these proleptic dates cannot be modified to align with Julian dates.

Years[edit]

YYYY
±YYYYY

ISO 8601 requires a minimum of a four-digit year format [YYYY] to address the year 2000 issue. This allows for the representation of years ranging from 0000 to 9999, where year 0000 corresponds to 1 BC, and all subsequent years are considered AD, akin to astronomical year numbering. However, the standard does not automatically permit the use of years prior to 1583 (the first complete year after the Gregorian calendar was introduced). Instead, it specifies that "values in the range [0000] through [1582] shall only be used by mutual agreement of the partners in information interchange."[2]


For years outside the range of 0000 to 9999, the standard allows for an expanded year representation, but this must be agreed upon in advance between the sender and receiver.[3] The expanded format [±YYYYY] requires additional year digits beyond the four-digit minimum, prefixed with either a + or − sign[4] rather than the traditional AD/BC (or CE/BCE) notation. By convention, 1 BC is represented as +0000, 2 BC as −0001, and so forth.[5]

Calendar dates[edit]

YYYY-MM-DD or YYYYMMDD
YYYY-MM (but not YYYYMM)
Only allowed in the (now superseded) 2000 version:[6]
YY-MM-DD or YYMMDD
-YY-MM or -YYMM
--MM-DD or --MMDD
--MM
---DD


Calendar date representations follow a specific format as illustrated in the accompanying box. Here, [YYYY] denotes a four-digit year ranging from 0000 to 9999, [MM] signifies a two-digit month from 01 to 12, and [DD] indicates a two-digit day within that month, from 01 to 31. For instance, "5 April 1981" can be expressed as ""1981-04-05"" in the extended format or "19810405" in the basic format.[7]

The standard also permits calendar dates to be presented with reduced precision. For example, ""1981-04"" can be used to represent "April 1981." Similarly, one might simply write "1981" to indicate that particular year, "198" to refer to the decade covering 1980 to 1989, or "19" to denote the century from 1900 to 1999. While both "YYYY-MM-DD" and YYYYMMDD formats are acceptable for full calendar date representations, if the day [DD] is omitted, only the YYYY-MM format is permissible. This restriction on the YYYYMM format helps prevent confusion with the shortened form YYMMDD, which is still commonly used. The version from 2000 had allowed the representation "--04-05" to imply "April 5," but the 2004 update no longer permits omitting the year when a month is specified.[8]

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 conform to specific formats as illustrated in the accompanying box. In this context, [YYYY] represents the ISO week-numbering year, which may differ slightly from the conventional Gregorian calendar year. The notation [Www] indicates the week number, prefixed by the letter W, ranging from W01 to W53. The [D] signifies the weekday number, which spans from 1 to 7, starting with Monday (1) and concluding with Sunday (7). For example, the date corresponding to the first day of the second week of 2023 (Monday) would be represented as "2023-W02-1." This format provides a clear and standardized way to identify specific weeks and days within the ISO week date system.

References[edit]

  1. 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.
  2. ISO 8601:2004(E). ISO. 2004-12-01. section 4.1.2.1 General.
  3. 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].
  4. ISO 8601:2004 sections 3.4.2, 4.1.2.4
  5. For example, see Annex B.1.1 of the standard.
  6. last in ISO 8601:2000, in use by 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., although removed in ISO 8601:2004
  7. Cite error: Invalid <ref> tag; no text was provided for refs named isofaqtnd
  8. Perreault, S. (August 2011). "DATE". vCard Format Specification. IETF. sec. 4.3.1. doi:10.17487/RFC6350. RFC 6350. Retrieved 2016-06-29. Truncated representation, as specified in [ISO.8601.2000], Sections 5.2.1.3 d), e), and f), is permitted.

See also[edit]