PHP 8.2.30
Preview: index.js Size: 988 B
/home/byroehnu/easepay.easetack.com/node_modules/date-fns/getUnixTime/index.js

"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = getUnixTime;
var _index = _interopRequireDefault(require("../getTime/index.js"));
var _index2 = _interopRequireDefault(require("../_lib/requiredArgs/index.js"));
/**
 * @name getUnixTime
 * @category Timestamp Helpers
 * @summary Get the seconds timestamp of the given date.
 *
 * @description
 * Get the seconds timestamp of the given date.
 *
 * @param {Date|Number} date - the given date
 * @returns {Number} the timestamp
 * @throws {TypeError} 1 argument required
 *
 * @example
 * // Get the timestamp of 29 February 2012 11:45:05 CET:
 * const result = getUnixTime(new Date(2012, 1, 29, 11, 45, 5))
 * //=> 1330512305
 */
function getUnixTime(dirtyDate) {
  (0, _index2.default)(1, arguments);
  return Math.floor((0, _index.default)(dirtyDate) / 1000);
}
module.exports = exports.default;

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
127 B lr--r--r-- 2026-03-14 01:49:15
Edit Download
163 B lrw-r--r-- 2026-02-28 00:36:48
Edit Download
988 B lrw-r--r-- 2026-02-28 00:33:48
Edit Download
1.36 KB lrw-r--r-- 2026-02-28 00:32:16
Edit Download
101 B lrw-r--r-- 2026-02-28 00:35:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).