Dated numeracy

The British habit of writing dates dd-MM-yyyy would be clashes with our numeration conventions. The American date format (MM-dd-yyyy) on the other hand is completely insane; it’s not even internally consistent. Where do people get this nonsense?

Nobody would write time ss:mm:hh because that would be silly. It would clash with our numeration convention of most significant digit to the left.

We write numbers right-to-left (RTL). This is opposite to our convention of writing left-to-right (LTR). We imported numeric RTL from the Arabs when we adopted base ten and the digits 0 to 9. You might think it would have been sensible to flip this around to match our LTR standard, but writing numbers with the most significant digits earliest has the profound advantage of making alphabetical and numerical sorts produce similar order – identical if you introduce leading zeroes.

This argument applies to any quantity, which brings me back to date-time.

There is only one reasonable format: yyyy-MM-dd HH:mm:ssZ

The Z is the timezone. A literal Z means UTC+0. Other codes indicate other time zones. For example 1984-10-03 15:48:21K is equivalent to 1984-10-03 05:48:21Z because zone K is UTC+10 (Australian Eastern Standard Time).

Anything else is just asking for trouble.

I have heard a lot of arguments in favour of localisation but they all amount to either “Our customers believe the world will end if they do not observe the sacred rituals,” or the slightly more compelling “Our customers will get annoyed and switch to competing products.”

The first argument is an attempt to shunt an inconvenience onto someone else. Just tell them the product is limited to canonical format so it can work correctly all over the world.

The second argument is a load of bollocks. The people who choose software are not the people who use it. When the people who actually use the software start complaining, the money has already been spent. By the time there is budget to change software, the actual users will have got used to canonical format and stopped whining. Unless your competitors have also heeded this article, this may even give you vendor lock-in.

I encourage rebellion. Use canonical date format and don’t give users a choice. It won’t hurt them and it will make an age-old problem vanish.

Published 12-06-2010 17:08 by peterw