Calendar Date - 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:  Calendar Date

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

    If the minds of women were enlightened and improved, the domestic circle would be more frequently refreshed by intelligent conversation, a means of edification now deplorably neglected, for want of that cultivation which these intellectual advantages would confer.
    Sarah M. Grimke (1792–1873)

    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)

    Reminiscences, even extensive ones, do not always amount to an autobiography.... For autobiography has to do with time, with sequence and what makes up the continuous flow of life. Here, I am talking of a space, of moments and discontinuities. For even if months and years appear here, it is in the form they have in the moment of recollection. This strange form—it may be called fleeting or eternal—is in neither case the stuff that life is made of.
    Walter Benjamin (1892–1940)