Good Will Blogging
How do you like them apples...



Jul 26

ISO… Pffft!

I like standards. Standards are good. Except when they’re stupid.

A while back I found myself about to argue that the Japanese date format (yyyy/MM/dd) was the international standard, followed by a long spiel about why it’s better. But I thought I should check my facts first, and a quick search in Wikipedia found this: http://en.wikipedia.org/wiki/ISO_8601 The tl;dr summary is, the ISO date format is yyyy-MM-dd.

Close enough though. My argument was going to be that the year-month-day format has 2 big benefits:

  • The units are in size-order. In this case, it’s big-medium-large, but the opposite order, eg. Australian (and presumably UK) format is dd/MM/yyyy, is just as valid for this criterion.
  • Having the biggest unit at the left makes it useful as a sort order. (In this case, ISO and Japanese formats are optimal).

After thinking about it for a while, I found that the ISO format’s use of hyphens instead of slashes as the separator also has some benefits over the Japanese use of slashes:

  • Hyphens are less distracting visually, making it easier to quickly read the component numbers.
  • Slashes are not very different to 1’s, whereas hyphens are not similar to any digit.
  • Slashes can’t be used in file or directory names. Hyphens can.

So far the ISO standard format sounds pretty good, right?

That’s dates, so how about times? According to ISO 8601, the standard format is hh:mm:ss. This is fine, and pretty much expected. However it does have a couple of problems:

  • The colon character is generally not allowed for file or directory names.
  • The colon is a little bit too close to digits in visual density, making it a little bit harder for the reader to find the component numbers.
  • No singular standard for sub-second precision.

OK, so not ideal. But not stupid. So what’s stupid?

It’s the part of the standard for combining a date and a time into a date-time stamp. The ISO format is yyyy-MM-ddThh:mm:ss, eg. 2011-07-26T13:46:15.

WTF?! T???

T” is a terrible delimiter. It has the same visual density as the digits on either side, making it harder for the reader to see where the date ends and the time begins. The example above looks like it’s made up of two parts, “2011-07” and “26T13:46:15”.

Worse, I’ve never seen “T” used as a delimiter in this way outside of the ISO format. At least with date and time, “-” and “:” have been commonly used as delimiters. So the “T” is foreign to everybody.

You know me. Faced with this anomaly in the universe, I feel compelled to appoint myself as a committee of one to fix the fracking international standard for date/time formats. Here goes.

  • Date: yyyy-MM-dd
  • Time: hh.mm.ss.SSS
  • Datetime: yyyy-MM-dd..hh.mm.ss.SSS

(The “SSS” can be extended to as many digits as needed. The sub-second and second components are optional.)

The benefits of this format are:

  • The units are in big-to-small order.
  • It’s easy to locate the component parts visually, and date and time are more separated than their internal component parts.
  • It can be used for file or directory names.
  • As a bonus: it can be typed entirely on the ten-key keypad with one hand on a standard PC keyboard, with no chording.

The disadvantages of this format are:

  • It’s one character longer than the ISO format, but I think this is an insignificant difference, and worth it for the visual clarity. A space character can be used in place of “..” in situations where a space character is permissible.
  • Using dots in the time format is less common than the colon character, but I think it’s ultimately better, and not difficult to understand.

What do you think?

Next Entry Previous Entry