ISO 8601: Difference between revisions

From tango.info wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
This wiki uses the ISO 8601 date format. This reduces ambiguities and makes searching the site with a search engine easier.
[[Category:ISO standard]]
ISO 8601:2004 is a standard having the name "Data elements and interchange formats — Information interchange — Representation of dates and times". [http://www.iso.org/iso/catalogue_detail?csnumber=40874]


examples:
[[tango.info]] uses the international date and time format as defined by [[w:ISO 8601]]. This eliminates ambiguities, makes searching the site and sorting dates easier.
'''2006-05-01'''


compare local formats
==Date==
A standard date format looks like: '''2006-05-01'''
 
Examples for non standard local formats:
*01/05/06 (does it mean 2001-05-06 or 2006-01-05 or 2006-05-01?)
*01/05/06 (does it mean 2001-05-06 or 2006-01-05 or 2006-05-01?)
*1.5.06
*1.5.06
Line 11: Line 14:
*1.5.2006
*1.5.2006


Range formats, e.g. for events that take place on several days are constructed with "/"
==Time==
Time is always written like '''21:30'''. Time intervals should be represented like '''21:30--23:45'''.
 
==Intervals==
Intervals are represented by start point and end point, seperated by "--". The ISO standard recomends "/" but allows "--" as a seperator. Because "--" can be used in filenames, tango.info prefers this.
 
===Examples for date intervals===
* '''2007-06-25--26''' -> start: 2007-06-25 end 2007-06-26 (two days)
* '''2007-06-25--29''' -> start: 2007-06-25 end: 2007-06-29 (five days)
* '''2007-06-25--07-01''' -> start: 2007-06-25 end: 2007-07-01 (seven days, touching two monthes)
* '''2007-12-30--2008-01-02''' -> start: 2007-12-30 end: 2008-01-02 (four days, touching two monthes and two years.)
 
===Examples for time intervals===
Time intervals should be represented like '''21:30--23:45'''.
 
===Examples for datetime intervals===
Datetime interval could be written like: '''2008-09-26 20:00--22:00'''


examples
==Repeating intervals==
* 2007-06-25/26 -> from 2007-06-25 until 2007-06-26 (two days)
*http://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals
* 2007-06-25/29 -> from 2007-06-25 until 2007-06-29
*defined in the standard in section 4.5 Recurring time interval
* 2007-06-25/07-01 -> from 2007-06-25 until 2007-07-01
**Number of repetitions (optional) from 1 to unbounded
**plus one of the following
***a) start point and end point
***b) duration and context
***c) start point and duration
***d) duration and end point
* tango.info would use c). Example with unbounded repetition:
** R--2008-01-01T14:30--16:00
** how to define when an event is repeated?


==links==
==Links==
*http://www.cl.cam.ac.uk/~mgk25/iso-time.html
*http://isotc.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?func=doc.Fetch&nodeid=4021199
*http://www.cs.tut.fi/~jkorpela/iso8601.html
*http://www.cl.cam.ac.uk/~mgk25/iso-time.html - Markus Kuhn
*http://www.cs.tut.fi/~jkorpela/iso8601.html - Jukka Korpela
*http://www.w3.org/TR/NOTE-datetime
*http://www.w3.org/TR/NOTE-datetime

Latest revision as of 2018-08-04T16:13:01

ISO 8601:2004 is a standard having the name "Data elements and interchange formats — Information interchange — Representation of dates and times". [1]

tango.info uses the international date and time format as defined by w:ISO 8601. This eliminates ambiguities, makes searching the site and sorting dates easier.

Date

A standard date format looks like: 2006-05-01

Examples for non standard local formats:

  • 01/05/06 (does it mean 2001-05-06 or 2006-01-05 or 2006-05-01?)
  • 1.5.06
  • 1/5/2006
  • 5/1/2006
  • 1.5.2006

Time

Time is always written like 21:30. Time intervals should be represented like 21:30--23:45.

Intervals

Intervals are represented by start point and end point, seperated by "--". The ISO standard recomends "/" but allows "--" as a seperator. Because "--" can be used in filenames, tango.info prefers this.

Examples for date intervals

  • 2007-06-25--26 -> start: 2007-06-25 end 2007-06-26 (two days)
  • 2007-06-25--29 -> start: 2007-06-25 end: 2007-06-29 (five days)
  • 2007-06-25--07-01 -> start: 2007-06-25 end: 2007-07-01 (seven days, touching two monthes)
  • 2007-12-30--2008-01-02 -> start: 2007-12-30 end: 2008-01-02 (four days, touching two monthes and two years.)

Examples for time intervals

Time intervals should be represented like 21:30--23:45.

Examples for datetime intervals

Datetime interval could be written like: 2008-09-26 20:00--22:00

Repeating intervals

  • http://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals
  • defined in the standard in section 4.5 Recurring time interval
    • Number of repetitions (optional) from 1 to unbounded
    • plus one of the following
      • a) start point and end point
      • b) duration and context
      • c) start point and duration
      • d) duration and end point
  • tango.info would use c). Example with unbounded repetition:
    • R--2008-01-01T14:30--16:00
    • how to define when an event is repeated?

Links