Display dates in any way your users want. I don’t care.
Edit dates in forms, the way that best suits your users, but make sure the format is clear.
Under-the-hood however there are NO EXCUSES. Acceptable date formats are
- YYYY-MM-DD
- YYYY-MM-DD HH:MM:SS
- YYYY-MM-DDTHH:MM:SSZ (ISOtastic!)
- seconds since 1970 (UNIX time)
At a push you could store timezones, but UTC is better.
If you ever use MM/DD/YYYY in a machine-readable file we will send the data-format ninjas to destroy your entire civilisation. (I’m looking at you, U.S.A.)
Actually if you’re writing a page for a global audience, make it clear. The best human format is with a month as 3 letters, so you can’t be confused about which bit is which. Some sodding sites have forced me to hunt through other pages to find a date where d>12 just to figure out which way around they are.
A good tip is also to put the day of the week in. In short term dates, people think in terms of next Wednesday, and if you don’t then they’ll be force to convert in their heads. Another benefit is that it catches typos as people see the resultant page and go “Hey, that says our meeting is on a Sunday…. oops did I say July? I meant June!”
I like putting in little ths on my dates but our communication manager keeps making me take them out again. It’s not a big deal, but I’m going to use one right now to cheer myself up.
Christopher Gutteridge, Saturday, 7th November, 2009.
