(config)
| 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 |