Friday, January 26, 2007

Using Standard Dates

Working on a project recently, I received feedback from another team member that "all date formats, whether for entry or exhibit, should be in a readable & usable format, i.e. mm/dd/yyyy." Although offense was probably not intended, I was extremely disappointed and even a bit insulted by this request, as I had taken care to represent date formats in a consistent, readable, and usable way throughout the project, or at least to choose tools that did so by default.

While not strictly an "Open Software" issue, I think usability issues and internationalization issues are often in the interests of Open Software advocates, so I thought I'd take a bit of time to discuss the ISO Date Format, why it is important, why and where you should consider using it and teaching other people about it.

For those who have not been officially introduced to it yet, the international standard (iso) date format is:


YYYY is the year on the Gregorian calendar, MM is the month from 01 to 12, and DD is the day of the month from 01 to 31.

For example, 2007-01-26 represents the 26th day of January, 2007.

Prior to standardization, common ways to represent this date are numerous, including:
  • 1/26/07
  • 26/1/07
  • 07/1/26
  • 26.1.2007
  • 26-JAN-2007
  • 26-January-2007
Each of these included variants with either slashes, hyphens, or periods. Sometimes the usage of a particular one of these formats focused around a geographic location, such as the M/D/YY which was somewhat prevalent in the United States, and other times they would focus around groups with special interest or profession.

The trouble with nonstandard dates is that they cannot be interpreted in a consistent manner. It becomes especially problematic when the day of the month is less than 12, and the month is rendered numerically, making the month and day field entirely indistinguishable.

[Tip: In addition to being more legible, the ISO format also has the benefit of being able to be sorted chronologically in its raw format by any alphanumeric sorter, such as in a spreadsheet.]

With the advent of the Internet era, we now have instant communication around the globe. The ISO date format is an absolute must in order to achieve effective and expected communication in regards to dates.

There are still some places where it would be appropriate to use other date formats, for example:
  • In a localized or personalized formal invitation such as a wedding or graduation announcement where a verbose format such as "Tuesday, the first of January, two thousand eight" would be appropriate.
  • In any educational material instructed someone how to interpret legacy date formats, or for use in examples to teach someone how to read ISO date format compared to their historic format.
  • In a dynamic environment (such as a preferences page) where the reader (not the publisher) has specifically requested their date to be presented in a non-standard format.
  • Interoperation with legacy applications or that are unable to be upgraded at the time. Even in this case, ISO should also be supported so that you do not become the reason the other application is unable to be upgraded, and visible representations outside of these legacy communications should be translated back into the standard format.
Anything other than these examples only serves to create confusion as the ISO date format comes into greater use.

When the opportunity presents itself you should not be shy, but be prepared to teach others about using the ISO date format, especially if you or they are in an industry where they transact business or correspondence on the Internet. Only a few moments of explanation can save them much confusion or embarrassment that could result from misinterpreted dates or missed appointments.

For more information on ISO 8601 date format see:

No comments: