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:

    The respect for human rights is one of the most significant advantages of a free and democratic nation in the peaceful struggle for influence, and we should use this good weapon as effectively as possible.
    Jimmy Carter (James Earl Carter, Jr.)

    Our goal as a parent is to give life to our children’s learning—to instruct, to teach, to help them develop self-discipline—an ordering of the self from the inside, not imposition from the outside. Any technique that does not give life to a child’s learning and leave a child’s dignity intact cannot be called discipline—it is punishment, no matter what language it is clothed in.
    Barbara Coloroso (20th century)

    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)