29 December 2009

day month year or year month day, but not month day year... time for ISO 8601

Most countries on planet earth use the system, day month year (dd mm yyyy) to reference a calendar date.

A minority use month day, year (mm dd, yyy) - Belize, Canada (occasionally, but conforms to the majority), Federated States of Micronesia, Palau, Philippines and the United States of America.

While most of the world understands the American system in context, there is still a lot of confusion, particularly for travellers. From the International Organization for Standardization (ISO)
How can one avoid confusion when a date like 08/04/02 has at least six different interpretations around the world? A notation like 01/02/03 could mean 1 February 2003 or 2 January 2003 or 2 March 2001. Usually by deduction one can sort it out. Usually - but sometimes, huge and costly confusions can arise. The problem is that all-numeric dates are not unambiguous and depend very much on local custom. That's usually OK within a country or region even if there are local inconsistencies between firms and administrations; but outside…?

A simple nicety, you might say. Does this all matter? Well, it certainly does if you "misinterpreted" what was on that ticket. And if you multiply this type of unfortunate occurrence by millions,in business contexts as well as at the individual level, you can see that the compounded problem is something quite frightening - well after the "Y2K bug" scare has receded. Perhaps not in a daily life, when you write to Cousin Bill in Atlanta, or Auntie Jenny in Australia where the systems of writing dates may be different. But think of the number of times that dates and times crop up in business dealings of all sorts, from insurance forms to travel agencies, from banks to tax forms. And there, huge stakes hang on dates, that can make the difference between winning a fortune… or losing it. Goods being traded internationally are relying on the right dates at each and every step - and wrong dates often mean wrong deliveries or no deliveries at all! And dates have caused many problems to computer programmers.

On the Internet, all kinds of notations are used, some language-dependent, and are they all correctly understood on the other side of the globe? Not so sure. Firms and administrations make use of dates in most of their daily operations in one form or another and in most documents used in international trade… and to have a universally compatible form of representation for them makes pure good sense.

So then: wouldn't it be wonderful if there were an internationally agreed standard?
Of course there is. ISO came up with one. ISO 8601, Data elements and interchange formats – Information interchange – Representation of dates and times. It is 33 pages long and will cost you CHF 130. In summary

ISO 8601 advises numeric representation of dates and times on an internationally agreed basis. It represents elements from the largest to the smallest element: year-month-day:

  • Calendar date is the most common date representation. It is:

YYYY-MM-DD

where YYYY is the year in the Gregorian calendar, MM is the month of the year between 01 (January) and 12 (December), and DD is the day of the month between 01 and 31.

Example: 2003-04-01 represents the first day of April in 2003.

  • Week date is an alternative date representation used in many commercial and industrial applications. It is:

YYYY-Www-D

where YYYY is the Year in the Gregorian calendar, ww is the week of the year between 01 (the first week) and 52 or 53 (the last week), and D is the day in the week between 1 (Monday) and 7 (Sunday).

Example: 2003-W14-2 represents the second day of the fourteenth week of 2003.

  • Time of the day is the time representation, using the 24-hour timekeeping system. It is:

hh:mm:ss

where hh is the number of complete hours that have passed since midnight, mm is the number of complete minutes since the start of the hour, and ss is the number of complete seconds since the start of the minute.

Example: 23:59:59 represents the time one second before midnight.

  • Date and time represents a specified time of a specified day. When use is made of the calendar date the representation is:

YYYY-MM-DDThh:mm:ss

where the capital letter T is used to separate the date and time components. Thus, for a very precise date and time, look at this:

Example: 2003-04-01T13:01:02 represents one minute and two seconds after one o'clock in the afternoon of 2003-04-01
After the Y2K mess, the world should have adopted a uniform standard, in much the same way that the prime meridian (latitude/longitude) and Greenwich Mean Time were adopted 125 years ago.

In any case, where possible to avoid confusion, spell out the month.

29/12/2009
29 Dec 2009
2009/12/29
2009 Dec 29

No comments: