JS: Date.now

By Xah Lee. Date: . Last updated: .

Date.now ( )

Return the milliseconds representation of current datetime.

Same as (new Date()).getTime().

Sample return value: 1428601360919

console.log ( Date.now () );
// 1509404594977

console.log ( (new Date).getTime() );
// 1509404594977

Reference

ECMAScript 2015 §Numbers and Dates#sec-date.now

Date Topic

  1. JS: Date Tutorial
  2. JavaScript Date.parse
  3. JS: Compute Date Range

  1. JS: Date Object
  2. JS: Date Constructor
  3. JS: Date.prototype

JS Object Reference

  1. Global
  2. Object
  3. Array
  4. Function
  5. String
  6. RegExp
  7. Date
  8. Set
  9. Map
  10. JSON
  11. Math
  12. Reflect
  13. Number
  14. Boolean
  15. Symbol
Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth