ISO 8601

(Difference between revisions)

Jump to: navigation, search
(adding XKCD comic)
m (entry-title, updated microformats section, responded to issues)
Line 1: Line 1:
-
=ISO 8601=
+
<entry-title>ISO 8601</entry-title>
The '''International Standards Organisation''''s standard, number '''8601''' is an international standard for date and time representations. It is used for all date-time representations in microformats, as well as a number of other formats (XML, XML Schema Datatypes, RDF, Atom).
The '''International Standards Organisation''''s standard, number '''8601''' is an international standard for date and time representations. It is used for all date-time representations in microformats, as well as a number of other formats (XML, XML Schema Datatypes, RDF, Atom).
 +
<div style="float: right">https://sslimgs.xkcd.com/comics/iso_8601.png
 +
 +
<small style="float: right">Image: [https://xkcd.com/1179/ XKCD]</small>
 +
</div>
 +
In addition, ISO 8601 dates in particular are the most globally unambiguously human readable/writeable date format and thus should always be used on the (world wide) web.
==Overview==
==Overview==
-
 
+
The following are good prose overviews of ISO 8601:
-
For a plain-language overview of ISO 8601, we recommend the [http://www.cl.cam.ac.uk/~mgk25/iso-time.html ISO 8601 summary by Markus Kuhn].
+
* [http://www.cl.cam.ac.uk/~mgk25/iso-time.html ISO 8601 summary by Markus Kuhn]
 +
* [http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 on Wikipedia]
==Microformats==
==Microformats==
 +
microformats in general use a subset of ISO8601 - preferring uses which are more human readable (requiring hyphens in dates, and colons in times).
-
Microformats using ISO8601 include:
+
All date-time properties in microformats use ISO8601 values. E.g.
-
 
+
* all <code>dt-*</code> properties in [[microformats2]]
-
*[[hAtom]]
+
* all classic microformats's date-time properties, including:
-
*[[hCalendar]]
+
**[[hAtom]] - <code>published</code>, <code>updated</code>
-
*[[hCard]]
+
**[[hCalendar]] - <code>dtstart</code>, <code>dtend</code>
-
*[[hReview]]
+
**[[hCard]] - <code>bday</code>
-
*...
+
**[[hReview]] - <code>dtreviewed</code>
 +
__TOC__
==<nowiki>RFC 3339</nowiki>==
==<nowiki>RFC 3339</nowiki>==
Line 23: Line 31:
*It explicitly excludes durations and dates before the [http://en.wikipedia.org/wiki/Common_era common era].
*It explicitly excludes durations and dates before the [http://en.wikipedia.org/wiki/Common_era common era].
*The more complex formats like week numbers and ordinal day are not permitted (see <nowiki>RFC 3339</nowiki>, section 5.6).  
*The more complex formats like week numbers and ordinal day are not permitted (see <nowiki>RFC 3339</nowiki>, section 5.6).  
-
 
-
Microformats {{should}} re-use <nowiki>RFC 3339</nowiki>, but {{must not}} be limited to it, in order to include both more human readable, yet still easily unambiguously parsable, alternatives, as well as ISO 8601 features deemed to be useful.
 
==ISO 8601 implementations in programming libraries==
==ISO 8601 implementations in programming libraries==
-
<div style="float: right">
 
-
https://sslimgs.xkcd.com/comics/iso_8601.png
 
-
 
-
<small style="float: right">Image: [https://xkcd.com/1179/ XKCD]</small>
 
-
</div>
 
-
 
* JodaTime - the Java date-time library - [http://joda-time.sourceforge.net/cal_iso.html ISO8601 Java calendar system]
* JodaTime - the Java date-time library - [http://joda-time.sourceforge.net/cal_iso.html ISO8601 Java calendar system]
* Perl: DateTime::Format::ISO8601
* Perl: DateTime::Format::ISO8601
Line 38: Line 38:
* Glenn Jones' [https://github.com/glennjones/microformat-node microformat-node] parser includes isodate.js, a Node.js implementation of (some of) ISO 8601.
* Glenn Jones' [https://github.com/glennjones/microformat-node microformat-node] parser includes isodate.js, a Node.js implementation of (some of) ISO 8601.
-
{{ToDo}} document different implementations.
+
{{ToDo}} document more implementations.
==Issues==
==Issues==
* How should dates before the common era be marked up? [[User:AndyMabbett|Andy Mabbett]]
* How should dates before the common era be marked up? [[User:AndyMabbett|Andy Mabbett]]
 +
** What are the use-cases? Link to *-examples page? - [[User:Tantek|Tantek]]
* If a web page is created or edited by a non-technical human, it is unfriendly to expect them to work in ISO date format. [[User:CharlesBelov|Charles Belov]]
* If a web page is created or edited by a non-technical human, it is unfriendly to expect them to work in ISO date format. [[User:CharlesBelov|Charles Belov]]
 +
** ISO dates are more readable/usable by people globally than any one locale-specific format, thus it is more friendly globally to use and ask humans to edit ISO 8601 dates than asking them to try to read/write all the odd and quirky locale-specific formats. - [[User:Tantek|Tantek]]
==See also==
==See also==

Revision as of 18:05, 16 August 2013


The International Standards Organisation's standard, number 8601 is an international standard for date and time representations. It is used for all date-time representations in microformats, as well as a number of other formats (XML, XML Schema Datatypes, RDF, Atom).

iso_8601.png

Image: XKCD

In addition, ISO 8601 dates in particular are the most globally unambiguously human readable/writeable date format and thus should always be used on the (world wide) web.

Overview

The following are good prose overviews of ISO 8601:

Microformats

microformats in general use a subset of ISO8601 - preferring uses which are more human readable (requiring hyphens in dates, and colons in times).

All date-time properties in microformats use ISO8601 values. E.g.

Contents

RFC 3339

RFC 3339 defines a profile of ISO 8601 for the use in Internet protocols and standards.

ISO 8601 implementations in programming libraries

to do! document more implementations.

Issues

See also

Related pages

ISO 8601 was last modified: Wednesday, December 31st, 1969

Views