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 sequence, advantages and/or ordering:

    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)

    To become aware in time when young of the advantages of age; to maintain the advantages of youth in old age: both are pure fortune.
    Johann Wolfgang Von Goethe (1749–1832)

    Seeing then that truth consisteth in the right ordering of names in our affirmations, a man that seeketh precise truth had need to remember what every name he uses stands for, and to place it accordingly, or else he will find himself entangled in words, as a bird in lime twigs, the more he struggles, the more belimed.
    Thomas Hobbes (1588–1679)