Customization

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
1Month NamesYou can add month names to the locale customization.
2Month AbbreviationThis method helps in customizing the month abbreviations.
3Weekday NamesThis method helps in customizing the weekdays names as per locale.
4Weekday AbbreviationThis method helps in customizing the weekday abbreviations based on the locale set.
5Minimal Weekday AbbreviationThis method helps in customizing the Minimal Weekday abbreviations based on the locale set.
6Long Date FormatsThis method helps in customizing longdateformat for a locale.
7Relative TimeThis method helps in obtaining the relative time.
8AM/PMThis method helps in customizing the meridiem as per locale.
9AM/PM ParsingYou can parse AM/PM using this method.
10CalendarThis helps in customizing calendar object for a locale set.
11OrdinalThe ordinal display for dates can be changed based on locale.
12Relative 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.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *