(-: Geekerie, logiciel libre et vilain gauchisme

Date format

All around the world, we are using some conventions to write short dates, and it seem that, despite the variations, none of us is using a nice convention. IMHO, a nice convention must (in addition to code the date):

  • order the different elements in a logical way
  • be easy to sort — a lexicographic sort should work

The US format (mm-dd-yyy) seems to be one of the worth: none of those two simple criteria are reached. The french one (dd/mm/yyyy) is a little better — the order of the elements is logical — but it fails for the second criteria.

The best one seems to be the one nobody use excepted in the computer world: yyyy-mm-dd. That’s the one I’m using for that blog.