tags:

views:

126

answers:

2

Hi All,

I have date as 31.03.2010 in german ofcourse 31 is date,03 is month and 2010 is year. Now I want to display the date as per the selected datetime format for the browser, say is user has german for him I would display 31.03.2010 whereas for English I would display 03/31/2010.

Any Idea how this can be done?

+1  A: 

Check out this SO post: http://stackoverflow.com/questions/555353/javascript-date-localization

Dustin Laine
A: 

I think every website that writes the month as a number should be blocked/filtered/censored.

Write the month as it's name. Especially if you an American website and use the STUPID MM/DD/YYYY format. NOWHERE else in the world uses that format and it confuses the hell out of everybody.

Coronatus
-1 As much as I agree with the general sentiment, this rant doesn't belong here. :)
deceze
The chief advantage of a number is that it has less need to be translated into a language-dependent string. This is moot for most websites, which are typically language-centric already, but it's highly useful for client-side sorting.
wallyk