Sha256: e54a0773752eeccab0930074a31f6f1cf62eee97d22ec1492b8a2e4bb150ae12

Contents?: true

Size: 549 Bytes

Versions: 19

Compression:

Stored size: 549 Bytes

Contents

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

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

    var i = normalizeObjectUnits(config._i),
        dayOrDate = i.day === undefined ? i.date : i.day;
    config._a = map(
        [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
        function (obj) {
            return obj && parseInt(obj, 10);
        }
    );

    configFromArray(config);
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
card-mod-date-0.15.6 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.15.0 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.14.2 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.14.1 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.14.0 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.13.4 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.13.3 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.13.2 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.13.1 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.13.0 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.7 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.12.0 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.6 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.5 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.4 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.3 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.2 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.1 vendor/moment/src/lib/create/from-object.js
card-mod-date-0.11.0 vendor/moment/src/lib/create/from-object.js