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
active_record_survey_api-0.0.19 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
active_record_survey_api-0.0.18 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
active_record_survey_api-0.0.17 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
active_record_survey_api-0.0.14 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
date_picker-0.0.9 test/dummy/vendor/assets/components/moment/src/lib/moment/locale.js
active_record_survey_api-0.0.12 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
locomotivecms-3.2.0.rc1 vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js
locomotivecms-3.1.1 vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js
locomotivecms-3.1.0 vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js
active_record_survey_api-0.0.11 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
locomotivecms-3.1.0.rc3 vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js
locomotivecms-3.1.0.rc2 vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js
locomotivecms-3.1.0.rc1 vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js
active_record_survey_api-0.0.7 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
active_record_survey_api-0.0.6 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/locale.js
date_picker-0.0.8 test/dummy/vendor/assets/components/moment/src/lib/moment/locale.js
date_picker-0.0.7 test/dummy/vendor/assets/components/moment/src/lib/moment/locale.js
sedge_cms-0.0.1 vendor/assets/components/moment/src/lib/moment/locale.js
date_picker-0.0.6 test/dummy/vendor/assets/components/moment/src/lib/moment/locale.js
date_picker-0.0.5 test/dummy/vendor/assets/components/moment/src/lib/moment/locale.js