MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / locale

Function locale

tests/test_code/js/moment/moment.js:4016–4028  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

4014 // instance. Otherwise, it will return the locale configuration
4015 // variables for this instance.
4016 function locale(key) {
4017 var newLocaleData;
4018
4019 if (key === undefined) {
4020 return this._locale._abbr;
4021 } else {
4022 newLocaleData = getLocale(key);
4023 if (newLocaleData != null) {
4024 this._locale = newLocaleData;
4025 }
4026 return this;
4027 }
4028 }
4029
4030 var lang = deprecate(
4031 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',

Callers

nothing calls this directly

Calls 1

getLocaleFunction · 0.85

Tested by

no test coverage detected