MomentJS - Unix Timestamp(seconds)



This method gives the no of seconds since the Unix epoch.

Syntax

moment().unix();

Example

var a = moment().unix();

Output

Unix Timestamp (seconds)

This value is floored to the nearest second, and does not include a milliseconds component.

momentjs_formatting_date_and_time.htm
Advertisements