MomentJS - As Array


Advertisements

This method will return the params in array form and the values in it will be same as we get for new Date().

Syntax

moment().toArray();

Example

var a = new Date();
var b = moment().toArray();

Output

As Array
momentjs_formatting_date_and_time.htm
Advertisements