Month Day - Advantages For Ordering in Sequence

Advantages For Ordering in Sequence

One of the advantages of using the ISO 8601 standard date format is that the lexicographical order (ASCIIbetical) of the representations is equivalent to the chronological order of the dates. Thus dates can be sorted using simple string comparison algorithms, and indeed by any left to right collation. For example:

1998-02-28 (28 February 1998) sorts before 1999-03-01 (1 March 1999) which sorts before 2000-01-30 (30 January 2000)

The YYYY-MM-DD layout is the only common format that can provide this. Sorting other date representations involves some parsing of the date strings. This also works when a time in 24-hour format is included after the date, as long as all times are understood to be in the same time zone.

ISO 8601 is used widely where concise, human readable yet easily computable and unambiguous dates are required, although many applications store dates internally as UNIX time and only convert to ISO 8601 for display. It is worth noting that all modern computer Operating Systems retain date information of files outside of their titles, allowing the user to choose which format they prefer and have them sorted thus, irrespective of the files' names.

Read more about this topic:  Month Day

Famous quotes containing the words advantages, ordering and/or sequence:

    [T]here is no Part of the World where Servants have those Privileges and Advantages as in England: They have no where else such plentiful Diet, large Wages, or indulgent Liberty: There is no place wherein they labour less, and yet where they are so little respectful, more wasteful, more negligent, or where they so frequently change their Masters.
    Richard Steele (1672–1729)

    The national anthem belongs to the eighteenth century. In it you find us ordering God about to do our political dirty work.
    George Bernard Shaw (1856–1950)

    We have defined a story as a narrative of events arranged in their time-sequence. A plot is also a narrative of events, the emphasis falling on causality. “The king died and then the queen died” is a story. “The king died, and then the queen died of grief” is a plot. The time sequence is preserved, but the sense of causality overshadows it.
    —E.M. (Edward Morgan)