I have a date that I want to display to the user, and the format should be dynamic and based on the user. If I do this I get a format that doesn't fit every user.
var prettyDate = originalDate.format('dd MMM yyy, hh:ss');
For example, in Sweden we would like it displayed as
2014-03-04 but another country would want it as
So instead of explicitly writing the format in the code, I want to get the preferred date format for the current user. My idea was that I could maybe use the culture found in _spPageContextInfo, or something in SP.DateTimeUtil, but I can't find anything.