iso-8601: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(adding XKCD comic)
Line 27: Line 27:


==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

Revision as of 10:44, 15 August 2013

ISO 8601

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).

Overview

For a plain-language overview of ISO 8601, we recommend the ISO 8601 summary by Markus Kuhn.

Microformats

Microformats using ISO8601 include:

RFC 3339

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

  • It explicitly excludes durations and dates before the common era.
  • The more complex formats like week numbers and ordinal day are not permitted (see RFC 3339, section 5.6).

Microformats SHOULD re-use RFC 3339, 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.png

Image: XKCD

  • JodaTime - the Java date-time library - ISO8601 Java calendar system
  • Perl: DateTime::Format::ISO8601
  • Ruby 1.9 implements an iso8601 method in the Date STDLIB but it does not handle ordinal dates.
  • Glenn Jones' microformat-node parser includes isodate.js, a Node.js implementation of (some of) ISO 8601.

to do! document different implementations.

Issues

  • How should dates before the common era be marked up? Andy Mabbett
  • 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. Charles Belov

See also

Related pages