Encyclopedia  |   World Factbook  |   World Flags  |   Reference Tables  |   List of Lists     
   Academic Disciplines  |   Historical Timeline  |   Themed Timelines  |   Biographies  |   How-Tos     
Sponsor by The Tattoo Collection
ISO 8601
Main Page | See live article | Alphabetical index

ISO 8601

ISO 8601 is an international standard for date and time representations. Its full English title is Data elements and interchange formats -- Information interchange -- Representation of dates and times. The current version is the second edition, ISO 8601:2000, dated 2000-12-15. This replaces the ISO 8601:1988 first edition.

The current time is --24TZ
(ISO 8601 format.)

The basic concept for the standard is to establish a moment in time as precisely or imprecisely as the user chooses through a string of characters. The characters are ordered from the largest representations (years) to the smallest (seconds, or fractions thereof.) After establishing this moment, the standard also allows for intervals and recurring intervals.

Table of contents
1 Dates
2 Times
3 Combined representations
4 Time intervals
5 Uses
6 External links


Dates can be described in three different ways in ISO 8601: Calendar dates, ordinal dates, and week dates. Each is detailed below.

There is an important note on years however. Year 0001 corresponds to AD 1. The year before that is 0000, which corresponds to 1 BC. The year before that is -0001, which corresponds to 2 BC. This pattern continues.

The standard uses the Gregorian calendar. Dates in other calendars such as the Julian calendar should in theory be converted to the Gregorian calendar before representation in ISO 8601. However, in practice, this may or may not happen, and the standard recognizes that by suggesting that in cases where there may be confusion, it is imperative that the sender and receiver must both agree which calendar is to be used. When the Gregorian calendar is applied to dates prior to its adoption, it is known as the Proleptic Gregorian calendar.

Years must be written with at least four digits to be unambiguous. Years written with two digits preceded by a hyphen may represent a year in an implied century, and two digits alone are used to designate a century. Unfortunately, common practice is to use two digits for either a year in an implied modern century or in the first century (89 might be 89 or 1989.) To prevent confusion, four digits are strongly recommended, as 0089 or 1989. Years with three digits such as 879 must be written with a leading zero, as 0879. Years may be described by more than four characters by agreement of sender and receiver. This addresses the year 10,000 problem, allowing the standard to specify dates later than AD 10,000 or earlier than 10,001 BC.

For purposes of reference ISO 8601 assigns the number 1875 to the year in which the Convention du Mètre was signed in Paris.

With the exception of years (as noted above), whenever a specification includes multiple characters, all the characters must be filled. This means that if hh is specified and the current hour is 4, the result must include a leading 0, as 04.

Calendar dates

Calendar dates are dates as most people know them. They involve determining the day within a year by counting within a month. For example, April 5 is a calendar date. ISO 8601 specifies calendar dates like this: YYYY-MM-DD. This means, for example, that the fifth day of the fourth month of 1981, or 1981-04-05, is written 1981-04-05. It may also be written 19810405 if compactness is more important than readability. The format with separators is called the extended format, while the format without is called 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 (this is, in fact, the basic version -- you should not leave out the separator.) You may simply write 1981 to refer to that year. Or you may even write 19 to refer to a century.

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. It is a lack of such clarity that led to the year 2000 problem.

Ordinal dates

Ordinal dates are dates in which a day is determined by counting within the entire year. Thus a day is represented by three digits, starting with January 1 being 001, February 1 being 032, and so on. December 31 will therefore be 365, except in leap years, where it will be 366.

An ordinal date is specified with YYYY-DDD. Thus, 1981-04-05 is represented as 1981-095. The basic format of this drops the separator, becoming 1981095.

Week dates

Week dates are dates in which a day is determined by counting within a week. Weeks are given two digits beginning with 01 as the first week of the year, up to 52 or 53 being the last week of the year (see below.) Days are given one digit beginning with 1 as Monday leading to 7 as Sunday. In the description of the representation, the W is the actual letter W, while ww refers to the two digit week number. The extended format representation of week dates is YYYY-Www-D. This means that 1981-04-05 is represented as 1981-W14-7, or 1981W147. This format can also specify a week, as 1981W14.

The first week of a year is the first week which includes at least four days in the new year. Another way of putting this is that the first week of a year is the week which includes the first Thursday of January. It will also include January 4. This means that week 01 could include days from the previous year, or that week 53 could include days from the next year. For example, 2004-01-01 occurs on a Thursday. This means that 2004-W01 consists of 2003-12-29 through 2004-01-04. 2005-01-01 occurs on a Saturday, meaning that 2004-W53 is 2004-12-27 through 2005-01-02, and 2005-W01 starts on 2005-01-03.


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 an hour between 00 and 24. mm refers to a minute between 00 and 59. ss refers to a second between 00 and 60. Using 60 to represent the second is only used when a leap second is being added. 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 or dot. A fraction may only refer to the most precise component of a time representation -- that is, if you are indicated 14 hours, 30 and one half minutes, you do not include a seconds figure. You represent it as 14:30.5 or 1430.5. (You may replace the . with a , depending on the local custom.)

Midnight is a special case and can be referred to as both 00:00 and 24:00. In practice it is preferred to use 00:00, but when indicating the end of a day use 24:00. 24:00 on 1981-04-05 is the same as 00:00 on 1981-04-06.

Time zones

If no time zone information is given with a time, the time zone intended is ambiguous. While it may be safely assumed to be in local time when used between two people in the same area, it is easily confusing when used to communicate between two different areas of the world. So it is often preferable to include the time zone information with the time.


If the time is in UTC, it is very easy to show this. Simply add a Z directly after the time, without a space. 09:30 UTC is therefore represented as 09:30Z or 0930Z. 14:45:15 UTC would be 14:45:15Z or 144515Z.

Other time zones

Other time zones are specified by their offset from UTC, in the format ±hh:mm, ±hhmm, or ±hh. So if the time being described is one hour later than UTC (such as the time in Berlin during the winter) the offset would be +01:00, +0100, or simply +01. This is appended to the time in the same way that Z was above. Note that the offset is the actual offset from UTC, and doesn't include any information on daylight saving time. Times expressed in local time for a user in Chicago would be -06:00 for the winter (Central Standard Time) and -05:00 for the summer (Central Daylight Time). The following times all refer to the same moment: 18:30Z, 22:30+04, 1130-0500, and 15:00-03:30. (It could also be expressed using a fraction of the hour, as 18.5Z.)

Combined representations

Combining date and time representations is quite simple. It is in the format of T. The and sections are any proper representation of the date and time created by following the standard. A common use could be YYYY-MM-DDThh:mm:ss±hh:mm. 1981-04-05T14:30:30-05:00, for example.

Time intervals

Time intervals specify an amount of time. They may be specified in four ways:

  1. Start and end, such as 2002-03-01T13:00:00Z/2003-05-11T15:30:00Z
  2. Start and duration, such as 2002-03-01T13:00:00Z/P1Y2M10DT2H30M
  3. Duration and end, such as P1Y2M10DT2H30M/2003-05-11T15:30:00Z
  4. Duration only, such as P1Y2M10DT2H30M

See below for explanations of the items beginning with P.

Of these, the first three require two separate values, seperated 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.


Durations are represented by the format PnYnMnDTnHnMnS' (you may replace nM with nW to use the week format.) In this representation replace n with the appropriate number for the element that follows it (leading zeros are optional but may clarify ambiguous durations) The capital letters (\P, Y, M, W, D, T, H, M, and S) are used as they are and not replaced. Thus P3Y6M4DT12H30M0S defines a period of three years, six months, four days, twelve hours, thirty minutes, and zero seconds''. Elements may be omitted if their value is zero.

Alternately, a format more similar to the combined representation may be used: PYYYY-MM-DDThh:mm:ss. To represent the same interval as above in this format, use P0003-06-04T12:30:00.

Repeating intervals

Repeating intervals are formed by adding Rn/ 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 means an unbounded number of repetitions. So, to repeat the interval of P1Y2M10DT2H30M five times starting at 2002-03-01T13:00:00Z, use R5/2002-03-01T13:00:00Z/P1Y2M10DT2H30M.


On the Internet, ISO 8601 is used by the W3C, defining a profile of the standard that restricts the supported formats to reduce the chance of error and the complexity of software. See also W3C link in External links, below.

External links