Date.now

now – Get the current number of milliseconds since 1 January 1970.

Description

Date.now()

Return values

Integer

Examples

Example #1 – now example
var now = Date.now(); console.log(now); // The timestamp in milliseconds. console.log(Math.round(now / 1000)); // The timestamp rounded to closest second.

External references