aboutsummaryrefslogblamecommitdiffstats
path: root/library/moment/src/lib/create/from-object.js
blob: af8e082f45b5ef628169ae8f1fb230c508a7a2f9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                              
import { normalizeObjectUnits } from '../units/aliases';
import { configFromArray } from './from-array';

export function configFromObject(config) {
    if (config._d) {
        return;
    }

    var i = normalizeObjectUnits(config._i);
    config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond];

    configFromArray(config);
}