summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/datetime/time.js
blob: 0c531017e60dbc5b5d213d4a044eec984f4e464c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"use strict";

module.exports = function time() {
  //  discuss at: http://locutus.io/php/time/
  // original by: GeekFG (http://geekfg.blogspot.com)
  // improved by: Kevin van Zonneveld (http://kvz.io)
  // improved by: metjay
  // improved by: HKM
  //   example 1: var $timeStamp = time()
  //   example 1: var $result = $timeStamp > 1000000000 && $timeStamp < 2000000000
  //   returns 1: true

  return Math.floor(new Date().getTime() / 1000);
};
//# sourceMappingURL=time.js.map