ISO 8601

(Difference between revisions)

Jump to: navigation, search
Current revision (11:28, 3 October 2013) (view source)
(ISO 8601 implementations in programming libraries: adding Python impl)
 
(One intermediate revision not shown.)
Line 1: Line 1:
-
HOW THING OUT
+
<entry-title>ISO 8601</entry-title>
-
HOW ANYTHING OUT
+
 
-
HOW EVERYTHING OUT
+
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 ([[HTML5]] <code>&lt;time&gt;</code> element &amp; <code>datetime</code> attribute, XML Schema Datatypes, RDF, Atom).
-
HOW UNIVERSE OUT
+
<div style="float: right">https://sslimgs.xkcd.com/comics/iso_8601.png
-
HOW MAKE THING OUT
+
 
-
HOW MAKE ANYTHING OUT
+
<small style="float: right">Image: [https://xkcd.com/1179/ XKCD]</small>
-
HOW MAKE EVERYTHING OUT
+
</div>
-
HOW MAKE UNIVERSE OUT
+
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.
-
HOW THING BE OUT
+
 
-
HOW ANYTHING BE OUT
+
==Overview==
-
HOW EVERYTHING BE OUT
+
The following are good prose overviews of ISO 8601:
-
HOW UNIVERSE BE OUT
+
* [http://www.cl.cam.ac.uk/~mgk25/iso-time.html ISO 8601 summary by Markus Kuhn]
-
HOW MAKE THING BE OUT
+
* [http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 on Wikipedia]
-
HOW MAKE ANYTHING BE OUT
+
 
-
HOW MAKE EVERYTHING BE OUT
+
==Microformats==
-
HOW MAKE UNIVERSE BE OUT
+
microformats in general use a subset of ISO8601 - preferring uses which are more human readable (requiring hyphens in dates, and colons in times).
-
HOW THING OUT
+
 
-
HOW ANYTHING OUT
+
All date-time properties in microformats use ISO8601 values. E.g.
-
HOW EVERYTHING OUT
+
* all <code>dt-*</code> properties in [[microformats2]]
-
HOW UNIVERSE OUT
+
* all classic microformats's date-time properties, including:
-
HOW MAKE THING OUT
+
**[[hAtom]] - <code>published</code>, <code>updated</code>
-
HOW MAKE ANYTHING OUT
+
**[[hCalendar]] - <code>dtstart</code>, <code>dtend</code>
-
HOW MAKE EVERYTHING OUT
+
**[[hCard]] - <code>bday</code>
-
HOW MAKE UNIVERSE OUT
+
**[[hReview]] - <code>dtreviewed</code>
-
HOW THING BE OUT
+
 
-
HOW ANYTHING BE OUT
+
__TOC__
-
HOW EVERYTHING BE OUT
+
== HTML5 ==
-
HOW UNIVERSE BE OUT
+
[[HTML5]] uses both a subset of ISO 8601 for dates, times, durations for the <code>&lt;time&gt;</code> element, as well as an extended (and more human friendly) duration format.
-
HOW MAKE THING BE OUT
+
 
-
HOW MAKE ANYTHING BE OUT
+
==<nowiki>RFC 3339</nowiki>==
-
HOW MAKE EVERYTHING BE OUT
+
 
-
HOW MAKE UNIVERSE BE OUT
+
RFC 3339 defines a profile of ISO 8601 for the use in Internet protocols and standards.
-
HOW THING OUT
+
 
-
HOW ANYTHING OUT
+
*It explicitly excludes durations and dates before the [http://en.wikipedia.org/wiki/Common_era common era].
-
HOW EVERYTHING OUT
+
*The more complex formats like week numbers and ordinal day are not permitted (see <nowiki>RFC 3339</nowiki>, section 5.6).
-
HOW UNIVERSE OUT
+
 
-
HOW MAKE THING OUT
+
==ISO 8601 implementations in programming libraries==
-
HOW MAKE ANYTHING OUT
+
* JodaTime - the Java date-time library - [http://joda-time.sourceforge.net/cal_iso.html ISO8601 Java calendar system]
-
HOW MAKE EVERYTHING OUT
+
* Perl: DateTime::Format::ISO8601
-
HOW MAKE UNIVERSE OUT
+
* Ruby 1.9 implements an iso8601 method in the Date STDLIB but it does not handle ordinal dates.
-
HOW THING BE OUT
+
* Glenn Jones' [https://github.com/glennjones/microformat-node microformat-node] parser includes isodate.js, a Node.js implementation of (some of) ISO 8601.
-
HOW ANYTHING BE OUT
+
* Python: [https://pypi.python.org/pypi/iso8601 iso8601]
-
HOW EVERYTHING BE OUT
+
 
-
HOW UNIVERSE BE OUT
+
{{ToDo}} document more implementations.
-
HOW MAKE THING BE OUT
+
 
-
HOW MAKE ANYTHING BE OUT
+
== FAQ ==
-
HOW MAKE EVERYTHING BE OUT
+
=== Why hyphens in dates ===
-
HOW MAKE UNIVERSE BE OUT
+
Q: Must I use the hyphens?[https://twitter.com/edburns/status/368063860835897344]
-
HOW THING OUT
+
 
-
HOW ANYTHING OUT
+
A: You <em>should</em> always use hyphens in ISO 8601 dates because that makes them more readable, and thus more human friendly.
-
HOW EVERYTHING OUT
+
 
-
HOW UNIVERSE OUT
+
Also, using hyphens helps clearly distinguish different uses for different granularities of dates, e.g.:
-
HOW MAKE THING OUT
+
* 2013-08-19 - just the day
-
HOW MAKE ANYTHING OUT
+
* 2013-08 - the whole month
-
HOW MAKE EVERYTHING OUT
+
* 2013 - the entire year
-
HOW MAKE UNIVERSE OUT
+
 
-
HOW THING BE OUT
+
==Issues==
-
HOW ANYTHING BE OUT
+
None currently.
-
HOW EVERYTHING BE OUT
+
 
-
HOW UNIVERSE BE OUT
+
Resolved issues: [[iso-8601-issues-resolved]].
-
HOW MAKE THING BE OUT
+
 
-
HOW MAKE ANYTHING BE OUT
+
==See also==
-
HOW MAKE EVERYTHING BE OUT
+
*[http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 on Wikipedia]
-
HOW MAKE UNIVERSE BE OUT
+
** [http://en.wikipedia.org/wiki/ISO_8601_usage ISO 8601 usage on Wikipedia]
-
HOW THING OUT
+
* [http://isotc.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?func=doc.Fetch&nodeid=4021199 ISO 8601:2004(E) from ISO] (zip-pdf, 228KB)
-
HOW ANYTHING OUT
+
* [http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html Summary of 8601 by ISO]
-
HOW EVERYTHING OUT
+
* [http://isotc.iso.org/livelink/livelink/fetch/2000/2122/138351/138352/customview.html?func=ll&objId=138352&objAction=browse&sort=name Technical Committee ISO/TC 154], Processes, data elements and documents in commerce, industry and administration.
-
HOW UNIVERSE OUT
+
* [http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm The Mathematics of the ISO 8601 Calendar]
-
HOW MAKE THING OUT
+
* [http://www.personal.ecu.edu/mccartyr/isowdcal.html Current date in '''week date''' and '''ordinal date''' format]
-
HOW MAKE ANYTHING OUT
+
* [http://www.dmoz.org/Science/Reference/Standards/Individual_Standards/ISO_8601/ ISO 8601 at the Open Directory Project]
-
HOW MAKE EVERYTHING OUT
+
* [http://www.w3.org/TR/NOTE-datetime W3C Specification about UTC Date and Time] and IETF Internet standard <nowiki>RFC 3339</nowiki>, based on ISO 8601
-
HOW MAKE UNIVERSE OUT
+
* StackOverflow: [http://stackoverflow.com/questions/tagged/iso-8601 iso-8601 tag] - questions about iso-8601 as related to JavaScript, PHP, MySQL and other programming languages and technologies.
-
HOW THING BE OUT
+
 
-
HOW ANYTHING BE OUT
+
==Related pages==
-
HOW EVERYTHING BE OUT
+
*[[datetime-design-pattern]]
-
HOW UNIVERSE BE OUT
+
*[[date-design-pattern]]
-
HOW MAKE THING BE OUT
+
*[[abbr-design-pattern]]
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+
-
HOW THING OUT
+
-
HOW ANYTHING OUT
+
-
HOW EVERYTHING OUT
+
-
HOW UNIVERSE OUT
+
-
HOW MAKE THING OUT
+
-
HOW MAKE ANYTHING OUT
+
-
HOW MAKE EVERYTHING OUT
+
-
HOW MAKE UNIVERSE OUT
+
-
HOW THING BE OUT
+
-
HOW ANYTHING BE OUT
+
-
HOW EVERYTHING BE OUT
+
-
HOW UNIVERSE BE OUT
+
-
HOW MAKE THING BE OUT
+
-
HOW MAKE ANYTHING BE OUT
+
-
HOW MAKE EVERYTHING BE OUT
+
-
HOW MAKE UNIVERSE BE OUT
+

Current revision


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 (HTML5 <time> element & datetime attribute, 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

HTML5

HTML5 uses both a subset of ISO 8601 for dates, times, durations for the <time> element, as well as an extended (and more human friendly) duration format.

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.

FAQ

Why hyphens in dates

Q: Must I use the hyphens?[1]

A: You should always use hyphens in ISO 8601 dates because that makes them more readable, and thus more human friendly.

Also, using hyphens helps clearly distinguish different uses for different granularities of dates, e.g.:

Issues

None currently.

Resolved issues: iso-8601-issues-resolved.

See also

Related pages

ISO 8601 was last modified: Thursday, October 3rd, 2013

Views