aboutsummaryrefslogtreecommitdiffstats
path: root/library/moment/src/lib/locale/set.js
blob: 32db2ad79527ff61c45ae3ffcace3246602f6c17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export function set (config) {
    var prop, i;
    for (i in config) {
        prop = config[i];
        if (typeof prop === 'function') {
            this[i] = prop;
        } else {
            this['_' + i] = prop;
        }
    }
    // Lenient ordinal parsing accepts just a number in addition to
    // number + (possibly) stuff coming from _ordinalParseLenient.
    this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
}