MomentJS allows to add customization to the locale created. This chapter discusses them in detail.
The following list shows the customizations possible on localization −
Sr.No. | Localization & Description |
---|---|
1 | Month NamesYou can add month names to the locale customization. |
2 | Month AbbreviationThis method helps in customizing the month abbreviations. |
3 | Weekday NamesThis method helps in customizing the weekdays names as per locale. |
4 | Weekday AbbreviationThis method helps in customizing the weekday abbreviations based on the locale set. |
5 | Minimal Weekday AbbreviationThis method helps in customizing the Minimal Weekday abbreviations based on the locale set. |
6 | Long Date FormatsThis method helps in customizing longdateformat for a locale. |
7 | Relative TimeThis method helps in obtaining the relative time. |
8 | AM/PMThis method helps in customizing the meridiem as per locale. |
9 | AM/PM ParsingYou can parse AM/PM using this method. |
10 | CalendarThis helps in customizing calendar object for a locale set. |
11 | OrdinalThe ordinal display for dates can be changed based on locale. |
12 | Relative Time ThresholdsThis is used with duration.humanize where the length of duration is displayed as a few seconds ago, in a minute, an hour ago etc. |
Leave a Reply