Wuff

Saturday, May 6, 2006

web: people of the world, it's 2006-05-06 today !

I came across another Web site
  • Screenshot: 8/03/2006
  • Screenshots: 6/02/2006
  • Screenshot: 26/02/2006
I'm not even American, but I've lived here so long that I can't read that first date as anything but August 03, 2006. Then I get to the last one and realize it's not, and I have to reassemble the date in my head. Meanwhile Europeans have the inverse problem with 3/8/2006. The lie is that picking one of mm/dd or dd/mm is friendly to your native readers: even people who read it correctly are off-balance wondering if their reading is correct.

Why do Web sites, blogs, and forums continue to aggressively confuse all their readers with ambiguous dates? The problem was solved 18 years ago with ISO8601 dates.
YYYY-MM-DD
2006-05-06


This simply works for every person on earth, and it has a number of nice technical features. Use it and stop confusing all your readers!

When you go to fix date format, you'll find software packages botch the date problem by offering a locale setting that tries to do the right thing, using mm/dd/yy for people who identify as en-us and dd/mm/yy for en-gb, etc. Again, this is a bad solution as it just preserves ambiguity (unless you put a waving animated American flag icon next to every date to remind people what they're reading!). The W3C still promotes this non-solution.

Technical: the ISO8601 date format is "%Y-%m-%d" in many formatting packages, or "%F" in newer ones based on strftime. E.g. echo date("%Y-%m-%d", $theTime) in PHP, use POSIX qw(strftime); print strftime("%F", $theTime) in Perl, date +%F in bash, etc.

Categories: , ,

1 Comments:

  • Sigh, it's getting worse not better. this blog has five different date formats: “13-06-2007”, “Thursday June 14th 2007”, “- 6/14/2007”, “(July 27th, 2006)”, “(Apr ‘05)”. Blogger itself uses multiple dissimilar date formats.

    By skierpage, at June 14, 2007 2:44 PM  

Post a Comment

Links to this post:

Create a Link

<< Home