- 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 - Calendar
This helps in customizing calendar object for a locale set.
Syntax
moment.updateLocale('en', {
calendar : Object
});
Example
var localeData = moment.locale('de', {
calendar: {
sameDay: "[heute um] LT",
sameElse: "L",
nextDay: '[morgen um] LT',
nextWeek: 'dddd [um] LT',
lastDay: '[gestern um] LT',
lastWeek: '[letzten] dddd'
},
});
var m = moment().subtract(1, 'days').calendar();
Output
momentjs_customization.htm
Advertisements