Why Can’t We Agree on One Sensible Date Format?
Shôn Ellerton, Aug 11, 2017
Can you tell me what day of the year 8/7/17 is on? No, you cannot.
If I said to you, ‘May I have a kilo of potatoes?’, I would be highly confident that you are going to give me 1 kilo of potatoes. Likewise, if I said to you that my height is 1.8m, I think you’d have a pretty good idea how tall I am, perhaps except the Americans who seem destined to dwell and languish in the world of feet, bushels and pounds. Having said that, they do teach children metric in schools (as I did when I went to school in Colorado) and the science and engineering communities have been embracing metric for some time as well.
Thankfully, we have ISO standards that define standard measurements. Length, weight, volume, magnetic flux, you name it; there’s an ISO standard for every one of them, including dates or days of the year. This is denoted as YYYY-MM-DD.
However, apart from China, Iran and a few other countries here and there, we have decided to pollute date formats with DD/MM/YYYY or far worse, MM/DD/YYYY.
As an aside, China’s postal addresses start from large to small. For example, a postal address in China starts with China, then the province, then the city and so on. It is just so damned sensible. Although, saying that, China’s single time zone is a little draconian considering the size of the country!
The U.S and its territories have near monopoly in using the most outrageous format of all: MM/DD/YYYY. Even worse, Canada claims to use all three date formats! If you were working as a customs official in Canada and you came across the date, 04/08/2017 on an incoming document from overseas, would you read this as 4th of August 2017 or 8th of April 2017? Unless someone clearly writes, August 4th, 2017, you would never really know.
The ISO standard for days of the year is YYYY-MM-DD. For example, August 4th 2017 is denoted as 2017-08-04. There is no confusion. Big to little.
Why is this a beautiful thing? It can be sorted alphabetically!
Coders and database programmers (like myself), for example, hate dealing with varying date formats. Large amounts of time are often invested in parsing and converting varying date formats to YYYY-MM-DD format, a universally accepted format for all mainstream database products. Moreover, further complications to parsing occurs when you have something like the following example:
July 8th, 2017 can be written as:
- July 8th 2017 (okay, it’s clear but not exactly concise)
- 08/07/2017 (except the U.S.)
- 8/7/2017 (except the U.S.)
- 8/7/17 (except the U.S.)
- 07/08/2017 (U.S. only)
- 7/8/17 (U.S. only)
- 2017-07-08 (Works everywhere! No parsing required!)
Logically, it does seem strange that we haven’t universally adopted the ISO format for days of the year considering that we have become far more globalised with the advent of the Internet. However, there will always be the great lumbering dinosaurs stalking our communities preaching phrases like, ‘We’ve always done it like this!’, ‘Why do we have to be like the Chinese?’ or ‘If it ain’t broke, don’t fix it!’.
As Arnold Schwarzenegger once said on one of his motivational videos, ‘Break some rules!’, why not do the same and break the tradition of using confusing date formats by using the YYYY-MM-DD format for now on.