The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Date format

Hello
I see from time to time, sites that in My account setting, among other things ask the user to register his date format preferences (dd/mm/yyyy, mm/dd/yyyy etc)

I was never able to undertstand why is that.

Logical thinking would be the user to expect to see the dates on his browser according to his machine current date and time settings
Anybody can explain reasoning behind this setting?

Thanks
Seemore
Tuesday, March 13, 2007
 
 
You can set your browser locale to whatever you want.  Locale affects how dates are typically displayed.  However, some applications don't know this, manage Locales separately (e.g. you can pick a different Locale in the application than in your browser, or let you explicitly configure things that the Locale normally would force upon you --  (e.g. I am in a American locale but an am Canadian, and want to see my dates in dd/mm/yyyy instead of mm/dd/yyyy), or are implemented in non Locale-aware fashion or languages and thus have to do it themselves.
Dan Fleet Send private email
Tuesday, March 13, 2007
 
 
It's because of different cultures.

07/04/2007 - US format (month is most significant)
04/07/2007 - 'UK' format (day is most significant)


But.....
Which sounds better?
 "Born on the 4th July"
-or
 "Born on July the 4th"
Oliver Stone must be a Brit at heart
Tuesday, March 13, 2007
 
 
I don't think the Brits celebrate the 4th of July quite the same way as Americans...  ;)

I prefer yyyy-mm-dd with slashes or dashes.
KC Send private email
Tuesday, March 13, 2007
 
 
Wow, the horror that is my post above will teach me to try to bang out an answer while my drive is waiting :)
Dan Fleet Send private email
Tuesday, March 13, 2007
 
 
Yeah - that's pretty much why I've always gone 04-Sep-2007
Trevor Send private email
Tuesday, March 13, 2007
 
 
The issue with webapps is that this data is generally emitted to the browser, and the server needs to do the formatting (you can set the thread locale in the web server to make your code simpler, but the server still needs to do the work).

Even if you want to emit if from the server in some canonical form and have the client render it according to their regional settings, this can be difficult in Javascript.  I tried it years ago and abandoned it.
Cade Roux Send private email
Wednesday, March 14, 2007
 
 
"I don't think the Brits celebrate the 4th of July quite the same way as Americans...  ;)"

Oh, we still celebrate it ... for pretty much the same reasons :D
David Aldridge Send private email
Wednesday, March 14, 2007
 
 
And on the fourth Thursday in November we celebrate Condolences.
Iago
Wednesday, March 14, 2007
 
 
Because it's much simpler this way. As the browser isn't sending any data about your locale settings and preferred date formats, it'd require javascript magic to send your locale preferences (or display all the dates using purely javascript). Though, it's certainly possible.
Wunar
Thursday, March 15, 2007
 
 
Can't you use the accept-language header (en-US/en-UK)?  Or is this not reliable?
bmm6o Send private email
Thursday, March 15, 2007
 
 
The user might not be using their own browser.  For example, if I used the site in an internet cafe, I would be nice to still have it display my desired format, even if I happened to be in another country.
danielsn
Thursday, March 15, 2007
 
 
"Can't you use the accept-language header (en-US/en-UK)?  Or is this not reliable?"

Good for a default, but you should allow it to be overridden.
Steve Hirsch Send private email
Friday, March 16, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz