Extended Date Time Format
Official Web Site  

 

References and Notes

[1] xs:date

The W3C XML schema language defines a data type 'xs:date' to represents a day, in terms of year, month, and day of month: 'yyyy-mm-dd'

The year is four or more digits. It may be preceded by a minus sign (for a negative year) but cannot begin with a plus (+) sign. It may be '0000' (for year zero).

Examples:

  • 2008-02-03
    February 3, 2008
  • 1966-01-01
    January 1 of the year 1966
  • -1966-01-01
    January 1 of the year -1966

[2] xs:time

The W3C XML schema language defines a data type 'xs:date', representing an instant of time in the form of hour, minute, second, and time zone offset: 'hh:mm:ss.sssssszzzzzz'

Seconds may be simply two digits, or may include a decimal portion of 1-to-6 digits representing the fractional portion, preceded by period.

The optional time zone indicator is preceded by a plus or minus, for "earlier" or "later" than UTC time.

For example 14:30:00-05:00 represents 2:30PM US Eastern time (which is 5 hours earlier than UTC).

The form of the time zone representation is 'hh:mm' for hours and seconds. Normally, 'mm' is "00", however some countries have defined time zones that differ from adjacent time zones by 30 minutes.

[3] xs:dateTime

The W3C XML schema language also defines a data type 'xs:dateTime', representing an instant in time, in terms of date and time where date and time are represented as xs:date and xs:time as described above, and they are separated by 'T".

Example: 2008-12-02T11:30:00-05:00 represents 11:30 US Eastern time on December 2, 2008.

[4] W3CDTF

W3CDTF is an Note published by the W3C, which defines a profile of ISO 8601 (discussed below). Its premise is that ISO 8601 is overly complex, describing many date/time formats, and that it is useful to restrict the supported formats to a small number, a set likely to satisfy most requirements.

The Note, though published by W3C, is not endorsed by W3C, and it contains a W3C disclaimer to that effect. Nevertheless it is used by metadata schemes, for example Dublin Core. W3CDTF prescribes the following formats:

  • Year: (four-digit) YYYY e.g. 2004
  • Year and month: YYYY-MM e.g. 2004-07
  • Date: YYYY-MM-DD e.g. 2004-07-04
  • Date plus hours and minutes: YYYY-MM-DDThh:mmTZD e.g. 2004-07-04T18:00-05:00
  • Date plus hours, minutes and seconds:  YYYY-MM-DDThh:mm:ssTZD e.g. 2004-07-04T18:00:30-05:00
  • Date plus hours, minutes, seconds and a decimal fraction of a second YYYY-MM-DDThh:mm:ss.sTZD e.g. 2004-07-04T18:00:30.25-05:00

[5] TEMPER

TEMPER (Temporal Enumerated Ranges) is an Internet Draft which addresses some of the concerns expressed.

[6] ISO 8601

The International Standard for the representation of dates and times: "Data elements and interchange formats — Information interchange — Representation of dates and times."