I am using Moment.js in my project and formatting dates as follows:
var date = moment.unix(1318781876);
return date.format('LLLL');
The moment docs state the multiple locales are supported. I would like to know if moment.js will auto-detect the locale, or do I need to detect the locale and pass it to moment?
Update
My goal is to ensure the displayed date is in the format of the user's region. i.e. in the US the short date format is mm/dd/yy whereas in the UK it is dd/mm/yy
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…