People, mind your dates… plz?

Saturday, December 15, 2007

technology02.pngWhat does 04/05/01 mean to you?
Let’s make it easy: is that date in 2001 or 2004?
And if I write it like 04/05/2001, is it really better? are we in April or May?
And the answer is…

Chinese Calendar If you are from North America and a handful other countries 04/05/01 would mean 5th of April 2001.
If you’re in Asia or some eastern countries, if could be 1st of May 2004.
For the rest of the world, it would look like 4th of May 2001.

We cannot ignore any longer the importance of writing dates in a format that is understandable by everyone.
Still too often, web sites -even big companies- with a global audience state dates in a format that is probably obvious where they live but not consistently so to everyone else.

Developers are sometimes guilty of this sin, as can be seen in the format chosen to specify dates in Microsoft Access SQL, which requires that hard-coded dates be formatted in the US rather than the more neutral ISO8601 format.
I wonder how many bugs that little egocentric feature caused in business applications that where developed by foreign coders
I know it also happened to me at least once…

Russian CalendarThe worst thing is that when you write 04/05/06, you may very well have thought about the rest of the world and meant DD/MM/YY; alas, unless the context grants us some clarification or the actual date is unequivocal, there is sometimes no way for a lot of us to know for sure what you really meant.

We should ban the use of the short date format in communications that may be read by more than 3 people, in today’s world, that’s pretty much all communication.

Instead a simple format such as 05MAY2006 is clear an unequivocal: it’s easy to read and understand, regardless of where you live.
You’re free to add spaces, dashes, dots, comas or slashes to it if you want, you can use 2006MAY05 if you prefer or even MAY05,2006, whatever pleases you: it still remains readable.

The rule is simple:write the year in full and never write the month as a two-digit number, that’s reserved for the day

The point is that you, me and the rest of the world can read it and understand exactly what was meant; it’s an easy problem to solve.
Surely that means something to you?

References

Entry Filed under  :  Musing,Programming

5 Comments Add your own

  • 1. Tony Toews  |  August 4th, 2008 at 4:49 am

    1) Some Canadians including some government offices use dd/mm.yy format. So your comment about North America is incorrect.

    2) Will all due respect I strenuously disagree with 05MAY2006 or similar as the date format. The ISO standard is yyyy-mm-dd. That date format is unambiguous.

    Otherwise your blog postings look quite interesting. I’ll be following your blog.

    Tony Toews, MS Access MVP

  • 2. Tony Toews  |  August 4th, 2008 at 7:23 am

    Whoops . dd/mm.yy should be dd/mm/yy.

  • 3. Renaud  |  August 4th, 2008 at 9:21 am

    Hi Tony, thanks for dropping by. Sorry to have bundled the USA with Canada in this, but from what you say, the situation is even worse in Canada with multiple formats being in use.

    You are right that ISO8601 is unambiguous. I would be glad if it were more widely adopted and everyone knew about it, but it’s not the case unfortunately and I doubt most people would be aware of the order in which the date is specified, which makes it ambiguous to read without that knowledge.

    Whatever your pick, the point is to make dates as unambiguous and readable as possible so order doesn’t matter.

    For website in multiple language where the user’s locale locale is not detected to print the date in the format they expect, then the ISO YYYY/MM/DD is preferable.

    In English websites, documentation, etc read by an international audience, I still think that 25MAY2008 or MAY25,2008 or 2008/MAY/25 or any other variation with the year in full and the month in letters is the only way to make it absolutely unambiguous to everyone.

  • 4. Alex Dybenko  |  August 4th, 2008 at 3:25 pm

    Hi, i think best aproach is one Access has. User can setup the date format he likes in control panel and Access uses it to enter and display dates, if you set format to short date. I follow this in my applications and it works fine for different contries

  • 5. Mac: Installing Windows S&hellip  |  August 31st, 2008 at 2:04 pm

    [...] not picking up my system date and time settings and displaying the date in the wrong format (a pet peeve of me), probably not Apple’s fault but annoying nonetheless. So far so good and while I [...]

Leave a Comment

(Will not be shown)
Notify me of follow-up comments via e-mail

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


about

Renaud This is a simple technical weblog where I dump thoughts and experiences from my computer-related world.
It is mostly focused on software development but I also have wider interests and dabble in architecture, business and system administration.
More About me…

My StackOverflow Profile
My (sporadically active) StackOVerflow account

Most Recent Posts

Categories

Links