from-object.js (549B)
1import { normalizeObjectUnits } from '../units/aliases'; 2import { configFromArray } from './from-array'; 3import map from '../utils/map'; 4 5export function configFromObject(config) { 6 if (config._d) { 7 return; 8 } 9 10 var i = normalizeObjectUnits(config._i), 11 dayOrDate = i.day === undefined ? i.date : i.day; 12 config._a = map( 13 [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], 14 function (obj) { 15 return obj && parseInt(obj, 10); 16 } 17 ); 18 19 configFromArray(config); 20}