MomentJS - Minimal Weekday Abbreviation


Advertisements

Syntax

moment.updateLocale('en', {
   weekdaysMin : String[]
});
moment.updateLocale('en', {
   weekdaysMin : Function
});

Example

var localeData = moment.updateLocale('en', {
   weekdaysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
});
var m = localeData.weekdaysMin();

Output

Minimal

Example

var localeData = moment.updateLocale('en', {
   weekdaysMinarr: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
   weekdaysMin: function (momentToFormat, format) {
      return this._weekdaysMinarr[momentToFormat.day()];
   }
});
var m = localeData.weekdaysMin(moment());

Output

Minimal weekdaysMin
momentjs_customization.htm
Advertisements