Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Customise parent locale #485

Merged
merged 2 commits into from Mar 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/moment/07-customization/00-intro.md
Expand Up @@ -31,6 +31,14 @@ moment.defineLocale('en-foo', {
```
Properties that are not specified in the locale will be inherited from the parent locale.

As of **2.16.0** it is possible to define a locale with a parent that hasn't itself been defined or loaded.

```javascript
moment.defineLocale('fakeLocale', {parentLocale:'xyz'})
```

As of **2.21.0** when attempting to create a moment with the newly defined locale, moment will attempt to lazy load the parent if it exists. Failing that it will default the parent to the global locale.

As of **2.12.0** it is also possible to update a locale's properties.

```javascript
Expand Down