es.date.now.js 385 B

1234567891011121314
  1. // TODO: Remove from `core-js@4`
  2. var $ = require('../internals/export');
  3. var uncurryThis = require('../internals/function-uncurry-this');
  4. var $Date = Date;
  5. var thisTimeValue = uncurryThis($Date.prototype.getTime);
  6. // `Date.now` method
  7. // https://tc39.es/ecma262/#sec-date.now
  8. $({ target: 'Date', stat: true }, {
  9. now: function now() {
  10. return thisTimeValue(new $Date());
  11. }
  12. });