ISO 8601 - Time Intervals

Time Intervals

/
/
/

A time interval is the intervening time between two time points. The amount of intervening time is expressed by a duration (as described in the previous section). The two time points (start and end) are expressed by either a combined date and time representation or just a date representation.

There are four ways to express a time interval:

  1. Start and end, such as "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z"
  2. Start and duration, such as "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
  3. Duration and end, such as "P1Y2M10DT2H30M/2008-05-11T15:30:00Z"
  4. Duration only, such as "P1Y2M10DT2H30M", with additional context information

Of these, the first three require two values separated by an interval designator which is usually a solidus or forward slash "/". Clause 4.4.2 of the standard notes that: "In certain application areas a double hyphen is used as a separator instead of a solidus." The standard does not define the term "double hyphen", but previous versions used notations like "2000--2002". Use of a double hyphen instead of a solidus allows inclusion in computer filenames. A solidus is a reserved character and not allowed in a filename in common operating systems.

For / expressions, if any elements are missing from the end value, they are assumed to be the same as for the start value including the time zone. This feature of the standard allows for concise representations of time intervals. For example, the date of a two-hour meeting including the start and finish times could be simply shown as "2007-12-14T13:30/15:30", where "/15:30" implies "/2007-12-14T15:30" (the same date as the start), or the beginning and end dates of a monthly billing period as "2008-02-15/03-14", where "/03-14" implies "/2008-03-14" (the same year as the start).

If greater precision is desirable to represent the time interval, then more time elements can be added to the representation. An observation period that has a duration of approximately three days, for example, can be succinctly shown as "2007-11-13/15", i.e. from any time on 2007-11-13 to any time on 2007-11-15. If a more exact start and end of the observation period need to be shown either for clarity or for measurement and recording purposes, the same time interval representation could be expanded to "2007-11-13T00:00/15T24:00", i.e. midnight at the start (T00:00) of 2007-11-13 to midnight at the end (T24:00) of 2007-11-15, a total of 72 hours.

Read more about this topic:  ISO 8601

Famous quotes containing the words time and/or intervals:

    What time of day is it, lad?
    William Shakespeare (1564–1616)

    Peter the Hermit, Calvin, and Robespierre, sons of the same soil, at intervals of three centuries were, in a political sense, the levers of Archimedes. Each in turn was an embodied idea finding its fulcrum in the interests of man.
    HonorĂ© De Balzac (1799–1850)