Sha256: 611e36baea647c911feab8f94e36abee9f08682d8a3fd8e3da6bad56eccad777

Contents?: true

Size: 948 Bytes

Versions: 66

Compression:

Stored size: 948 Bytes

Contents

import { getLocale } from '../locale/locales';
import { deprecate } from '../utils/deprecate';

// If passed a locale key, it will set the locale for this
// instance.  Otherwise, it will return the locale configuration
// variables for this instance.
export function locale (key) {
    var newLocaleData;

    if (key === undefined) {
        return this._locale._abbr;
    } else {
        newLocaleData = getLocale(key);
        if (newLocaleData != null) {
            this._locale = newLocaleData;
        }
        return this;
    }
}

export var lang = deprecate(
    'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
    function (key) {
        if (key === undefined) {
            return this.localeData();
        } else {
            return this.locale(key);
        }
    }
);

export function localeData () {
    return this._locale;
}

Version data entries

66 entries across 65 versions & 13 rubygems

Version Path
card-1.100.0 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.99.6 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.99.5 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.99.4 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.99.3 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.99.2 mod/date/vendor/moment/src/lib/moment/locale.js
ilog-0.4.1 node_modules/moment/src/lib/moment/locale.js
ilog-0.4.0 node_modules/moment/src/lib/moment/locale.js
ilog-0.3.3 node_modules/moment/src/lib/moment/locale.js
card-1.99.1 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.99.0 mod/date/vendor/moment/src/lib/moment/locale.js
jester-data-8.0.0 node_modules/moment/src/lib/moment/locale.js
ezii-os-5.2.1 node_modules/moment/src/lib/moment/locale.js
ezii-os-2.0.1 node_modules/moment/src/lib/moment/locale.js
card-1.98.3 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.98.2 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.98.1 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.98.0 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.97.0.1 mod/date/vendor/moment/src/lib/moment/locale.js
card-1.97.0 mod/date/vendor/moment/src/lib/moment/locale.js