| Date and time in UTC | --TZ
ISO 8601, "Data elements and interchange formats – Information interchange – Representation of dates and times" is an international standard for date and time representations. The signature feature of the ISO 8601 format is that all values are organized from most to least significant. This leads, among others, to the increasingly familiar YYYY-MM-DDThh:mm:ss format seen in international forums.
The first edition of the ISO 8601 standard was published in 1988 and unified and replaced a number of older ISO standards on various aspects of date and time notation: ISO 2014, 2015, 2711, 3307 and 4031. It has since then been superseded by a second edition in 2000 and finally the current third edition, ISO 8601:2004, published 2004-12-03.
ISO 2014 was the standard that originally introduced the big-endian all-numeric date notation 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.
Date and time values are organized from most to least significant. Each value (eg, year, month, day, time) has a fixed number of digits which must be padded with leading zeros. For instance, the American notation "4:30 a.m." would be written 04:30. As a result, for each of the several formats of dates and times lexicographical order corresponds to chronological order, except for negative years.
Representation can be done in one of two formats: A basic format with a minimal number of characters, or an extended format with separators to enhance human readability. The standard permits a hyphen separator between date elements, and a colon between hours, minutes, and seconds.[http://lists.ebxml.org/archives/ebxml-core/200104/pdf00005.pdf For example, 2006-01-06 may be written 20060106 without ambiguity. The extended formats are preferred over basic formats because some basic formats are ambiguous.
Any number of fields may be dropped from any of the date and time formats, but the least significant fields must be dropped first. For example, 2004-05 is a valid ISO 8601 date, which indicates the 5th month of the year 2004. This date will never represent the 5th day of some unknown month in 2004.
Finally, the standard supports the addition of a decimal fraction to the smallest time unit, where higher precision is needed.
The standard uses the leap rule and month sizes of the Gregorian calendar, which is already the de facto standard of international trade.
| ±YYYY |
|---|
For purposes of reference ISO 8601 assigns the number 1875 to the year in which the Convention du Mètre was signed in Paris.
| YYYY-MM-DD | or | YYYYMMDD |
|---|
Calendar dates are the form familiar to most people. As represented above, YYYY indicates a year with century. MM indicates the month of the year, 01 through 12. DD indicates the day of that Julian month, from 01 through 31. For example, "5th of April 1981" may be represented as 1981-04-05 in the extended format, or 19810405 in the basic format.
The standard allows for dates to be written with less precision. For example, you may write 1981-04 to mean "April, 1981". You may simply write 1981 to refer to that year.
The standard also allows for dates which include an implied element, such as an implied century. It is careful to emphasize the importance of clear communication between sender and receiver when implied elements are being used.
| YYYY-Www-D | or | YYYYWwwD |
|---|
A week date specifies a so-called ISO year in the format YYYY, a week number in the format ww prefixed by the letter W, and the weekday number, a digit d from 1 through 7, beginning with Monday and ending with Sunday. This form is popular in manufacturing.
Mutually equivalent definitions for week 01 are:
The week number can be described by counting the Thursdays: week 12 contains the 12th Thursday of the year.
The ISO 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 ISO year number deviates from the number of the normal year (Gregorian year) on, if applicable, a Friday, Saturday, and Sunday, or a Saturday and Sunday, or just a Sunday, at the start of the ordinary year (which are at the end of the previous ISO year) and a Monday, Tuesday and Wednesday, or a Monday and Tuesday, or just a Monday, at the end of the ordinary year (which are in week 01 of the next ISO year). For Thursdays the ISO year number is always equal to the ordinary year number.
Examples:
For an overview of week numbering systems see week number. The US system has weeks from Sunday through Saturday, and partial weeks at the beginning and the end of the year. An advantage is that no separate year numbering like the ISO year is needed, while correspondence of lexicographical order and chronological order is preserved.
| YYYY-DDD | or | YYYYDDD |
|---|
Ordinal dates are a simple form for times 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. As represented above, YYYY indicates a year. DDD is the day of that year, from 001 through 366 in leap years. For example, "1981-04-05" is also 1981-095.
This format has particular use for simple hardware systems that have need of a date system, but where including full calendar calculation software may be a significant nuisance. This system is frequently, if incorrectly, referred to as the Julian Date.
The standard allows for expansion of the year, by agreement between sender and receiver. Expansion means that the year may be written with more than four digits, which addresses the year 10,000 problem, by allowing the standard to specify dates later than AD 10000 or earlier than 10001 BC. Note however that expansion introduces ambiguities if separators are not used. For instance 200406 could either mean the year 200406 or June 2004. The ISO standard suggests that "provisions be made" to prevent such confusions.
| hh:mm:ss | or | hhmmss |
|---|---|---|
| hh:mm | or | hhmm |
| hh |
ISO 8601 uses the 24-hour clock system that is used by much of the world. The basic format is hhmmss and the extended format is hh:mm:ss. hh refers to a zero-padded hour between 00 and 24, where 24 is only used to notate the midnight at the end of a calendar date. mm refers to a minute between 00 and 59. ss refers to a second between 00 and 59 (or 60 in the exceptional case of an added leap second). So a time might appear as 13:47:30, or 134730.
It is also acceptable to omit elements to reduce precision. hh:mm, hhmm, and hh are all used.
Fractions may also be used with all three of the time elements. These are indicated by using the decimal point (either a comma (which is preferred) or dot). A fraction may only refer to the most precise component of a time representation — that is, to denote "14 hours, 30 and one half minutes", do not include a seconds figure. Represent it as 14:30.5 or 1430.5.
Midnight is a special case and can be referred to as both 00:00 and 24:00. The notation 00:00 is used at the beginning of the day, and is the most frequently used one. At the end of a day use 24:00. Note that 1981-04-05T24:00 is the same instant as 1981-04-06T00:00.
| or | ||
|---|---|---|
| or | ||
| |
|---|
Combining date and time representations is quite simple. It is in the format of
The date and time representations may sometimes appear in proximity, separated by a space or other characters, in which case they occupy two separate fields in a data system, rather than a single combined representation. This is sometimes done for human readability. Unlike the above example, 1981-04-05 14:30:30-05:00 are two separate representations, one for date and the other for time.
| PnYnMnDTnHnMnS |
|---|
Alternately, a format more similar to the combined representation may be used: PYYYY-MM-DDThh:mm:ss. To represent the same duration as above in this format, use P0003-06-04T12:30:00.
| |
|---|
| |
| |
| |
Of these, the first three require two separate values, separated by the interval designator, which is usually a forward slash "/". (The double hyphen (--) is permissible in some applications but is not preferred.) An example using the format from item #1 is 1981-04-05T14:30:30-05:00/2004-07-14T15:30:30-05:00. If any elements are missing from the second value, they are assumed to be the same as the first value, including time zone elements.
RFC 3339 defines a profile of ISO 8601 for the use in Internet protocols and standards. It explicitly excludes durations and dates before the common era. It uses the notation hh:mm:ss-00:00 to indicate an unknown local time zone. The more complex formats like week numbers and ordinal day are indirectly discouraged.
ISO 8601 is referenced by several specifications, but not always is the full range of options of ISO 8601 used. For example the different EPG standards for TV, digital radio etc. do use several formats to describe points in time and durations.
The ISO 8601 week date, as of 2006-01, already appears in its basic form on major brand commercial packaging in the US. Its appearance depends 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 to work weeks, and products can be correctly targeted for recall.
Specific calendars | ISO standards
ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601 | ISO 8601
This article is licensed under the GNU Free Documentation License.
It uses material from the
"ISO 8601".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world