Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: sorting dates in YYYYMMDD format

by QM (Vicar)
on Jul 10, 2013 at 09:10 UTC ( #1043428=note: print w/ replies, xml ) Need Help??


in reply to Re^2: sorting dates in YYYYMMDD format
in thread sorting dates in YYYYMMDD format

One of the great things about YYYYMMDD is that if you sort it lexicographically you get it properly sorted!

Yes! This is what bugs me about all the international date "standards" -- none of them sort naturally. The only tweak I use is for human readability, YYYYMMmmmDD, where mmm is the 3 letter abbreviation (in the language of choice), which helps the mildly dyslexic distinguish 5 March and 3 May (though maybe that's the hardest one).

-QM
--
Quantum Mechanics: The dreams stuff is made of


Comment on Re^3: sorting dates in YYYYMMDD format
Re^4: sorting dates in YYYYMMDD format
by Anonymous Monk on Jul 10, 2013 at 13:13 UTC
    Hos does a date in ISO 8601 format -- YYYY-MM-DDThh:mm:ss (and variations) -- does not sort correctly? Or, by "international date "standards"" did you mean something else?

      "Hos does a date in ISO 8601 format -- YYYY-MM-DDThh:mm:ss (and variations) -- does not sort correctly?" -- self.

      That horrible sentence should have been: "How do dates in ... -- YYYY-MM-DDThh:mm:ss (and variations) -- not sort correctly?".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043428]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-20 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls