I\'d like to get the names of the days of the weeks in JavaScript, localized to the user\'s current language; preferably with something a bit nicer than what I\'m using now:
Take a look at datejs, it handles localization very nicely. It comes with a lot of globalization setups. You just load the globalization setup of your current CultureInfo and datejs takes care of the rest.
Javascript Date Localization
I use Date.toLocaleString()
, for example:
d = new Date();
d.toLocaleString(window.navigator.language, {weekday: 'long'});
or
d.toLocaleString('sk-SK', {weekday: 'short'});