MomentJS - Unix Timestamp(milliseconds)


Advertisements

This method gives the number of milliseconds since the Unix epoch.

Syntax

moment().valueOf();
+moment();

Example 1

var a = moment().valueOf();

Output

Unix

Example 2

var a = +moment();

Output

Unix Moment
momentjs_formatting_date_and_time.htm
Advertisements