Logo

Contact:
Claus Tøndering –
(Please include the word “calendar” in the subject line)

ISO 8601

 

 

The International Organization for Standardi­zation, ISO, has published a standard on how to write dates, times, and time intervals. This standard is known as ISO 8601. The current version of the standard is from 2019. It consists of two parts; their titles are ISO 8601-1:2019, “Date and time — Representations for information interchange — Part 1: Basic rules” and ISO 8601-2:2019, “Date and time — Representations for information interchange — Part 2: Extensions”

The text below is not an exhaustive description of everything you may find in ISO 8601; it does, however, try to capture the most important points.

Today’s ISO 8601 date:

What date format does the standard mandate?

There are three basic formats: Calendar date, ordinal date, and week date.

A calendar date should be written as a 4-digit year number, followed by a 2-digit month number, followed by a 2-digit day number. Thus, for example, 2 August 1953 may be written:

19530802    or    1953-08-02

An ordinal date should be written as a 4-digit year number, followed by a 3-digit number indicating the number of the day within the year. Thus, for example, 2 August 1953 may be written:

1953214    or    1953-214

2 August was the 214th day of 1953.

A week date should be written as a 4-digit year number, followed by a W, followed by a 2-digit week number followed by a 1-digit week day number (1=Monday, 2=Tuesday, ..., 7=Sunday). Thus, for example, 2 August 1953 may be written:

1953W317    or    1953-W31-7

2 August was the Sunday of week 31 of 1953.

In all the examples above, the hyphens are optional.

Note that you must always write all the digits. Thus the year 47 must be written as 0047.

What time format does the standard mandate?

A 24-hour clock must be used. A time is written as a 2-digit hour, followed by a 2-digit minute, followed by a 2-digit second, followed by a comma, followed by a number of digits indicating a fraction of a second. For example, thus:

140812,35    or    14:08:12,35

The fraction, the seconds, and the minutes may be omitted if less accuracy is required:

140812or14:08:12
1408or14:08
14

In all the examples above, the colons are optional. The comma may be replaced by a period (.), but this is not recommended.

The time may optionally be followed by a time zone indication. For UTC, the time zone indication is the letter Z. For other time zones, the indication is a plus or minus followed by the time difference to UTC (plus for times east of Greenwich, minus for times west of Greenwich). For example:

1130Z(11:30 UTC)
1130+0430(11:30, at a location 4 and a half hours ahead of UTC)
1130-05(11:30, at a location 5 hours behind of UTC)

What if I want to specify both a date and a time?

Date and time indications can be strung together by putting the letter T between them. For example, ten minutes to 7 p.m. on 2 August 1953 may be written as:

19530802T185000    or    1953-08-02T18:50:00

What format does the standard mandate for a time interval?

There are several to choose from. A time interval can be specified as a starting time and an ending time or as a duration together with either a starting time or an ending time.

There are too many details to cover here, so I shall only give a few examples:

Using starting time and ending time:

1998-12-01T12:03/2004-04-02T14:12

Using starting time and duration:

1927-03-12T08:04/P1Y4M12DT6H30M9S

This last example should be read as the time interval starting on 12 March 1927 at 08:04 and lasting for 1 year, 4 months, 12 days, 6 hours, 30 minutes, and 9 seconds. The letter P following the slash indicates that a duration follows.

Can I write BC dates and dates after the year 9999 using ISO 8601?

Yes, you can.

The year 1 BC must be written as 0000. The year 2 BC must be written as -0001, the year 3 BC must be written as -0002 etc.

Years of more than 4 digits must be written with an initial plus sign. Thus the year AD 10000 must be written as +10000.

Can I write dates in the Julian calendar using ISO 8601?

No. The standard requires that the Gregorian calendar be used for all dates. Dates before the introduction of the Gregorian calendar are written using the proleptic Gregorian calendar. This is one of the few places where the proleptic Gregorian calendar is used.

Thus the Julian date 12 March 826 must be written as 0826-03-16, because its equivalent date in the Gregorian calendar is 16 March.

Does the standard define the Gregorian calendar?

Yes, ISO 8601 specifies how the Gregorian calendar works. The specification is completely compatible with the calendar specified by Pope Gregory XIII in 1582, except that ISO 8601 does not concern itself with the calculation of Easter.

However, the calendar reference point used by the standard is not Christ’s birth but the date on which the metric convention (Convention du Mètre) was signed in Paris. The standard defines that date to be 20 May 1875.

Similarly, the reference point of the week cycles is 1 January 2000, which is defined to be a Saturday.

Of course, these reference points are also completely compatible with common usage.

What does the standard say about the week?

According to ISO 8601, Monday is the first day of the week.

Each week has a number. A week that lies partly in one year and partly in another is assigned a number in the year in which most of its days lie. The standard specifies this by saying that week 1 of any year is the week that includes the first Thursday of that year.

More details can be found in this section.

Why are ISO 8601 dates not used in this Calendar FAQ?

The standard specifies how to write dates using only numbers. The standard explicitly does not cover the cases where dates are written using words (such as January, February, etc.). In fact, the standard itself makes frequent use of dates such as “20 May 1875” and “15 October 1582”.

In other words, ISO 8601 helps people with data communication where it is natural to use all-number dates. In everyday language (spoken and written) we are free to use the terms we like best.

Where can I get the standard?

If you are looking for a free copy somewhere on the internet, forget it! ISO makes money from selling copies of their standards.

The two pars of ISO 8601:2019 can be bought from ISO at https://www.iso.org. They are very expensive. The last time I checked, the price was 158 and 178 Swiss Francs (about U.S. $171 and $193), respectively, for a 38 and a 75 page document.

Your local library may be able to find a copy for you.