Wednesday, 27 February 2013

How to write the date

Thank you Randall - I have been saying this for ages


It is worth elaborating on this for the hard of thinking...
  1. We write numbers with the most signifcant parts on the left, even in languages that write right-to-left (I think), so, for example, the number 123 has the hundreds left (100) then the tens (20) and then the units (3). So writing dates in the same order makes sense with year, then month, then date. One could, perhaps, argue that people say "27th February, 2013" and so you should write it that way around, but people are inconsistent, e.g. "February 27th, 2013", and so on. Also, people say "Half past 2" but we know to write times logically as HH:MM:SS.
  2. There are lots of good reasons to write dates and times with leading zeros as it makes them the same size and line up and so on, so using 02 for Feburary not 2. 2013-2-27 would be messy. It also breaks the following point...
  3. Using dates in this format you can sort dates alphabetically and get date order. Putting time HH:MM:SS on the right means you can sort date/times.
  4. This is the format used by SQL
  5. Y2K has taught us to put a year in full is way better
  6. Putting a year in full means you know which of the three fields is the year and so immediately know this is not either the "UK" format (DD/MM/YY) or the "US" format (MM/DD/YY) and so avoid any confusion - it has to be ISO format as nobody does YYYY-DD-MM (not even in one of Randall's examples).
I remember starting to write dates in this format when I was at uni, as it was an "international standard". I confused people by writing dates like that on cheques. But that was a few years before 1988, which probably means my memory is faulty.


  1. Japan, and I think Quebec, used YY-MM-DD - not good when you've dates in more than one century to worry about, but otherwise, that was good, and we used to use YYMMDD a lot in databases at school - this advice changed to "YYYYMMDD when it needs to be a number, YYYY-MM-DD where text" by the time I took GCSEs. I agree, it is the truly sensible format.

  2. I sometimes use "27Feb2013" to be clear.

  3. I will do YYYY-MM-DD for dates for myself but if I am doing dates for humans (and dyslexics who can mix up numbers) I'll use something more longform like DD-MMM-YYYY e.g 27-FEB-2013. For me it's a mix of "what is technically right" + accessibility. Same reason I don't use 24hr clock at work or for accessible publications because many dyslexic students of ours get horribly confused.

  4. While I prefer to use YYYY-MM-DD and 24hr clock for myself I have learned that many dyslexic people will transpose numbers so this format can be confusing. So at work I'll often use DD-MMM-YYYY like 27-FEB-2013 and 12hr clock 1pm, 1:15pm etc cos accessibility does override "being right" as it were.

  5. Japan also sometimes numbers years as years-in-the-reign-of-the-current-emporer, which an era identifier; which is pretty un-future-proof. Like old acts of parliament.

  6. I agree that mixed numeric and month name are acceptable, but any numeric only date is simply wrong if not in the format stated