MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / currentDateArray

Function currentDateArray

tests/test_code/js/moment/moment.js:2560–2571  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

2558 }
2559
2560 function currentDateArray(config) {
2561 // hooks is actually the exported moment object
2562 var nowValue = new Date(hooks.now());
2563 if (config._useUTC) {
2564 return [
2565 nowValue.getUTCFullYear(),
2566 nowValue.getUTCMonth(),
2567 nowValue.getUTCDate(),
2568 ];
2569 }
2570 return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
2571 }
2572
2573 // convert an array to a date.
2574 // the array should mirror the parameters below

Callers 1

configFromArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected