MomentJS - Array



A moment can be created with input as an array and the values passed in the array to be same as how we would pass to new Date() JavaScript object.

Syntax

moment(Number[]);

Example

var day = moment([2018,10,08, 10, 30,40]);

Output

Array
momentjs_parsing_date_and_time.htm
Advertisements