Brought in another asset for Ray's eye form: moment
[openemr.git] / public / assets / moment-2-13-0 / src / lib / moment / locale.js
blobfb46e6569e8c0d71fb3be0ec23cdf1901acaaf30
1 import { getLocale } from '../locale/locales';
2 import { deprecate } from '../utils/deprecate';
4 // If passed a locale key, it will set the locale for this
5 // instance.  Otherwise, it will return the locale configuration
6 // variables for this instance.
7 export function locale (key) {
8     var newLocaleData;
10     if (key === undefined) {
11         return this._locale._abbr;
12     } else {
13         newLocaleData = getLocale(key);
14         if (newLocaleData != null) {
15             this._locale = newLocaleData;
16         }
17         return this;
18     }
21 export var lang = deprecate(
22     'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
23     function (key) {
24         if (key === undefined) {
25             return this.localeData();
26         } else {
27             return this.locale(key);
28         }
29     }
32 export function localeData () {
33     return this._locale;