iso-8601: Difference between revisions
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (talk | contribs) No edit summary |
m (Reverted edits by [[Special:Contributions/000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) |
||
Line 1: | Line 1: | ||
<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 ([[HTML5]] <code><time></code> element & <code>datetime</code> attribute, 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== | |||
The following are good prose overviews of ISO 8601: | |||
* [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 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. | |||
* all <code>dt-*</code> properties in [[microformats2]] | |||
* all classic microformats's date-time properties, including: | |||
**[[hAtom]] - <code>published</code>, <code>updated</code> | |||
**[[hCalendar]] - <code>dtstart</code>, <code>dtend</code> | |||
**[[hCard]] - <code>bday</code> | |||
**[[hReview]] - <code>dtreviewed</code> | |||
__TOC__ | |||
==<nowiki>RFC 3339</nowiki>== | |||
RFC 3339 defines a profile of ISO 8601 for the use in Internet protocols and standards. | |||
*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). | |||
==ISO 8601 implementations in programming libraries== | |||
* JodaTime - the Java date-time library - [http://joda-time.sourceforge.net/cal_iso.html 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' [https://github.com/glennjones/microformat-node microformat-node] parser includes isodate.js, a Node.js implementation of (some of) ISO 8601. | |||
{{ToDo}} document more implementations. | |||
==Issues== | |||
* 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]] | |||
** 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== | |||
*[http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 on Wikipedia] | |||
** [http://en.wikipedia.org/wiki/ISO_8601_usage ISO 8601 usage on Wikipedia] | |||
* [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) | |||
* [http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html Summary of 8601 by ISO] | |||
* [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. | |||
* [http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm The Mathematics of the ISO 8601 Calendar] | |||
* [http://www.personal.ecu.edu/mccartyr/isowdcal.html Current date in '''week date''' and '''ordinal date''' format] | |||
* [http://www.dmoz.org/Science/Reference/Standards/Individual_Standards/ISO_8601/ ISO 8601 at the Open Directory Project] | |||
* [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 | |||
* 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. | |||
==Related pages== | |||
*[[datetime-design-pattern]] | |||
*[[date-design-pattern]] | |||
*[[abbr-design-pattern]] | |||
Revision as of 05:23, 19 August 2013
<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 (HTML5 <time>
element & datetime
attribute, XML Schema Datatypes, RDF, Atom).
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.
- all
dt-*
properties in microformats2 - all classic microformats's date-time properties, including:
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).
ISO 8601 implementations in programming libraries
- 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 more implementations.
Issues
- How should dates before the common era be marked up? Andy Mabbett
- What are the use-cases? Link to *-examples page? - 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. 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. - Tantek
See also
- ISO 8601 on Wikipedia
- ISO 8601:2004(E) from ISO (zip-pdf, 228KB)
- Summary of 8601 by ISO
- Technical Committee ISO/TC 154, Processes, data elements and documents in commerce, industry and administration.
- The Mathematics of the ISO 8601 Calendar
- Current date in week date and ordinal date format
- ISO 8601 at the Open Directory Project
- W3C Specification about UTC Date and Time and IETF Internet standard RFC 3339, based on ISO 8601
- StackOverflow: iso-8601 tag - questions about iso-8601 as related to JavaScript, PHP, MySQL and other programming languages and technologies.