Skip to content
Advertisement

Get list of abbreviated day of the week in moment using

I am using moment and I want to get list of abbreviated day of the week.

so ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]

I want to be able to use different languages to get these

JavaScript
JavaScript

I was able to get a list of days but starts with today, how can I arrange it so it always start with Sunday? also I want to be able to use different languages like Spanish

Advertisement

Answer

If you import moment-with-locales.js instead of locales you can access the localization data in moment.localeData(locale). Examples:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement