2

I was wondering whether there is a special function to be used in javascript to get a dateFormat by locale code.

String dateFmt = function_get_date_format_by_locale_code ('en');

would return MM/dd/yyyy.

ghTvNath
  • 357
  • 2
  • 6
  • 25
  • In what browser do you have formatting possibilities on the toString() without changing the prototype? – mplungjan Feb 08 '12 at 10:25
  • Perhaps you were thinking of http://stackoverflow.com/questions/2385474/set-a-locale-in-javascript – mplungjan Feb 08 '12 at 10:29
  • I found something similar, which may spurt more thoughts to add to your question: http://stackoverflow.com/questions/673905/best-way-to-determine-users-locale-within-browser – seangates Oct 01 '12 at 18:53

1 Answers1

0

Not an exact answer to the question, but you could try using date.js, a great little library for working with dates in JavaScript. It has some locale functionality/support I believe...

danwellman
  • 9,068
  • 8
  • 60
  • 88