ISO 8601

from Wikipedia, the free encyclopedia
Logo of the German Institute for Standardization DIN ISO 8601
Area Date
title Data elements and exchange formats - Information exchange - Representation of date and time (ISO 8601: 2004)
Brief description: Writing rules for the date format
Latest edition 2006-09
ISO 8601

ISO 8601 is an international standard of ISO , the recommendations on numerical date formats contains and times. The title of the standard is Data elements and interchange formats - Information interchange - Representation of dates and times , means "Data elements and exchange formats; Exchange of information; Representation of date and time ”.

As a result of the adoption in the European standard EN 28601: 1992 , the recommendations of ISO 8601 on dates and times - as far as they are purely numerical, i.e. in particular do not contain any written or abbreviated month names - according to ISO 8601: 1988 also in Germany , Austria and the Switzerland . In September 2006, DIN ISO 8601 replaced these standards as well as the older DIN 1355 and DIN 1355-1 for the area of ​​German standards. In addition, the standard has also been incorporated into DIN 5008 ( writing and design rules for text and information processing ).

On February 25, 2019, a new version of the standard was published in two parts, ISO 8601-1: 2019 and ISO 8601-2: 2019.

Summary

The standard contains various date and time formats, which, however, are purely formal and in most cases can be distinguished by the number of digits used. The standard is best known for the date format YYYY - MM - DD , which is also often referred to as the "international date format". The most common time format of the standard is hh : mm : ss . An example for the date is 2004-06-14 (June 14, 2004) and for the time 23:34:30 (11 PM, 34 minutes and 30 seconds) and for both together 2004-06-14T23: 34: 30. For international communication of times of day, the difference between the zone time used and the coordinated universal time (UTC) can be added, in the form +01: 00, +0100 or +01 for Central European time and e.g. For example, −04:30 or −0430 for Venezuela standard time .

The use of these formats is recommended above all in the field of natural sciences, software development, documentation and for international correspondence, as this is where the greatest potential for errors is due to country-specific formats. Various country-specific spellings for April 2nd, 2008 (2008-04-02) are mentioned as an example: 2/4/08, 4/2/08, 08/4/2, 4/2/2008.

In addition, the date format according to DIN EN 28601 in Germany on May 1st, 1996 became the only standard numerical date format (e.g. 1996-05-01) and thus replaced the traditional format according to DIN 1355-1 (1.5.1996) from. All institutions that are under the influence of the DIN standards (including all educational institutions and public institutions) are encouraged to use the new format. However, large parts of the population continued to use the old format in everyday life, which led to the re-approval of the usual format due to the new regulation of DIN 5008 in 2001, if this did not lead to misunderstandings. The version published in 2020 provides this notation with a four-digit year only for letters to domestic recipients.

In addition, like its predecessors since the 1970s, the standard defines Monday as the first day of the calendar week . The week with the first Thursday in January is defined as the first calendar week of the year. This means that January 4th always falls in the first calendar week. This rule prevents that the first work week does not contain a single work day. The Gregorian calendar serves as the basis , also recalculated for the time before 1582 ( proleptic ).

Principles

  • In all formats that conform to the standard, dates and times are written in the order from the highest to the smallest unit ("falling spelling"). The order of the digits corresponds to the “natural” valence in place value systems in mathematics, since the larger units come before the smaller ones (year before month, etc.). This has the advantage that the lexicographical and the chronological sorting of lists of date and time values ​​lead to the same result. (This only does not apply if negative years or a mixture of the date formats defined by the standard are used in the list.)
  • In each format, date or time values ​​are divided into different units (such as year, month, day or hour, minute, second). Each unit must be represented with a fixed number of digits, which can be reached with leading zeros if necessary.
  • For each format there is a short version with a minimum number of separators and an extended version that contains additional separators for better human readability. The standard recommends using only the extended versions in texts. The short line ("hyphen-minus", U + 002D) is used between date units and the colon is used as a separator between time units . For example, June 3, 2014 is written in short form as 20140603 and in expanded form as 2014-06-03.
  • If values ​​with less precision are to be specified, the values ​​of individual time units can be omitted, but only starting with the smallest units (ie "from the end"). For example, 2004-06 is a valid date and indicates June (6th month) of the year 2004. Under no circumstances does this indicate the 6th day of any month in 2004, nor does it indicate a period from 2004 to 2006 .
  • If required by an application, the value of the smallest displayed time unit can also be specified more precisely using a decimal fraction. A point or a comma can be used as a separator for the decimal places .

presentation

Variables used here, always with leading zeros if necessary:

variable presentation values Explanation
J YYYY 0000… 9999 year
  • can also be negative or zero
  • can be extended by convention
M. MM 01… 12 month
w ww 01… 53 Week of the year
T T 1… 7 Day of the week, Monday through Sunday
TT 01… 31 Day of month
TTT 001 ... 366 Day of the year
H hh 00… 24 Hour, 24 only in 24:00 as the end time
m mm 00… 59 minute
s ss 00 ... 60 Second, 60 only as a leap second
f f (0… 9) + decimal fractions, usually seconds of any precision

Characters used

Separator for fixed dates

separator Explanation
P Separator of date and specification of a period (from English period )
T Date and time separator ( time )
W. (To identify a week week )
- binding sign for dates before the epoch
+ selectable sign for dates after the epoch
- Date element separator (often selectable, but recommended)
: Separator of time elements (often selectable, but recommended)
, or . Separator of integer and decimal fraction

Separator when specifying periods of time

separator Explanation
Y Year ( year )
M. Month ( month )
W. Week ( week )
D. Day ( day )
H Hour ( hour )
m Minute ( minute )
s Sec ( second )
f decimal fractions of a second ( fraction )
/ Separator of start and end date (to)

date

Date examples with positive information Examples of dates with negative information
format example format example
YYYY-MM-DD 2004-07-11 −YYYY-MM-DD −0333-07-11
YYYYMMDD 20040711 −YYYYMMDD −03330711
YYYY-MM 2004-07 −YYYY-MM −0333-07
YYYY 2004 −YYYY −0333
YYYY-www 2004-W28 −YYYY-www −0333-W28
YYYYWww 2004W28 −YYYYWww −0333W28
YYYY-Www-T 2004-W28-7 −YYYY-Www-D −0333-W28-7
YYYYWwwT 2004W287 −YYYYWwwD −0333W287
YYYY-DDD 2004-193 −YYYY-DDD −0333-193
YYYYDDD 2004 193 −YYYYDDD −0333193

The month-day format was codified in ISO 2014 prior to ISO 8601: 1988 , the week-day format including week counting in ISO 2015 and the day format in ISO 2711 .

Time of day

format example
hh: mm: ss 16:43:16
hhmmss 164316
hh: mm 16:43
hhmm 1643
hh 16
hh: mm: ss, f 16: 43: 16.2345

Time zones

According to the recommendation, the difference to Coordinated Universal Time (UTC) is indicated after a coherent date and time . The format is “± hh: mm”, “± hhmm” or “± hh” and thus takes into account both the time zone and daylight saving time. “Z” for UTC (+00: 00) can also be entered as a special value. In order to determine the time in UTC from a local time specification, the value must be subtracted after a "+", which must be added after a "-".

Examples with time zone information
example Explanation
2007-08-31T16: 47 +00: 00 4:47 p.m. on August 31, 2007 in the UTC time zone.
2007-12-24T18: 21 Z 6:21 p.m. on December 24, 2007, also in the UTC time zone.
2008-02-01T09: 00: 22 +05 9:00:22 AM on February 1, 2008 in a time zone that is 5 hours ahead of UTC, such as the zone time specified in Pakistan.
2009-01-01T12: 00: 00 +01: 00 12:00 p.m. on January 1, 2009 in Vienna ( CET ).
2009-06-30T18: 30: 00 +02: 00 6:30 p.m. on June 30, 2009 in Vienna ( CEST - summer time).

Time spans

A period of time is shown in the format . The P shows as Battle Scene Direction information letter that a period (English period follows). Time periods that contain a time component are delimited by a T as in the specification of the start time. The months and minutes (M) are therefore distinguishable. The same rules apply to the formatting of the start time as to the normal date specification. [Startdatum]P[JY][MM][WW][TD][T[hH][mM][s[.f]S]]

Alternatively, if possible, the start and end dates can be entered separately by a slash (/). The standard also allows the use of two short dashes (-) instead of the forward slash.

Examples
  • 2005-08-09T18: 31: 42P3Y6M4DT12H30M17S : defines a period of 3 years, 6 months, 4 days, 12 hours, 30 minutes and 17 seconds from August 9, 2005 "shortly after half past six in the evening".
  • P3Y6M4DT12H30M17S : the same time period as the first example, but without defining a specific start date
  • P1D : " See you tomorrow at this time."
  • PT24H : " See you in 24 hours from now.", Which differs from the previous example in the case of a time change
  • 2005-08-09P14W : "The 14 weeks starting on August 9, 2005."
  • 2005-08-09 / 2005-08-30 : "From August 9th to August 30th, 2005."
  • 2005-08-09--2005-08-30 : "From August 9th to August 30th, 2005."
  • 2005-08-09 / 30 : "From August 9th to 30th, 2005."

Scope of the years

The standard only allows years from 1583 (the year after the introduction of the Gregorian calendar ) to 9999 without further agreement.

  • The interpretation of dates before October 15, 1582 is not specified by the standard, it is therefore only dependent on the agreement made.
  • Agreements between the data exchange partners are required both for the use of the years 0000 to 1582 and for the expansion of the display format with which a larger range of years can be displayed.
  • In the case of an extended representation, the specification of a sign, including the positive one, is mandatory. The number of additional numerical digits, for example, must be agreed. For example, if two additional digits have been agreed, April 12, 1985 should be shown in the extended format as + 001985-04-12.
  • It is possible to agree to use the usual Julian calendar ; the standard provides for the proleptic Gregorian calendar as an alternative.

Proleptic Gregorian Calendar

ISO 8601 provides for the possibility of using the Gregorian calendar for the time before its introduction on October 15, 1582, but only with a corresponding agreement between the data exchange partners. In this proleptic Gregorian calendar, in contrast to the Julian calendar (see year zero ), the year with the designation “0000”, which is a leap year , exists . In an extended representation according to ISO 8601, in this case “–0001” corresponds to the Julian year 2 BC. Chr. Etc.

Web links

Individual evidence

  1. DIN 5008 : 2020-03 Writing and design rules for word processing and information processing , Section 11.4 Date information , Subsection 11.4.1 Numerical writing