- MomentJS Tutorial
- MomentJS - Home
- MomentJS - Overview
- MomentJS - Environment Setup
- MomentJS - Introduction
- MomentJS - Parsing Date And Time
- MomentJS - Date Validation
- MomentJS - Getter/Setter
- Manipulate Date And Time
- Formatting Date And Time
- MomentJS - Date Queries
- MomentJS - Internationalization
- MomentJS - Customization
- MomentJS - Durations
- MomentJS - Utilities
- MomentJS - Plugins
- MomentJS - Examples
- MomentJS Useful Resources
- MomentJS - Quick Guide
- MomentJS - Useful Resources
- MomentJS - Discussion
MomentJS - Weekday Abbreviation
This method helps in customizing the weekday abbreviations based on the locale set.
Syntax
moment.updateLocale('en', { weekdaysShort : String[] }); moment.updateLocale('en', { weekdaysShort : Function });
Example
var localeData = moment.updateLocale('en', { weekdaysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] }); var m = localeData.weekdaysShort();
Output
Example
var localeData = moment.updateLocale('en', { weekdaysShortarr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], weekdaysShort: function (momentToFormat, format) { return this._weekdaysShortarr[momentToFormat.day()]; } }); var m = localeData.weekdaysShort(moment());
Output
momentjs_customization.htm
Advertisements