REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.32 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/date-fns/subHours/index.js
Text
Base64
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = subHours; var _index = _interopRequireDefault(require("../addHours/index.js")); var _index2 = _interopRequireDefault(require("../_lib/requiredArgs/index.js")); var _index3 = _interopRequireDefault(require("../_lib/toInteger/index.js")); /** * @name subHours * @category Hour Helpers * @summary Subtract the specified number of hours from the given date. * * @description * Subtract the specified number of hours from the given date. * * @param {Date|Number} date - the date to be changed * @param {Number} amount - the amount of hours to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. * @returns {Date} the new date with the hours subtracted * @throws {TypeError} 2 arguments required * * @example * // Subtract 2 hours from 11 July 2014 01:00:00: * const result = subHours(new Date(2014, 6, 11, 1, 0), 2) * //=> Thu Jul 10 2014 23:00:00 */ function subHours(dirtyDate, dirtyAmount) { (0, _index2.default)(2, arguments); var amount = (0, _index3.default)(dirtyAmount); return (0, _index.default)(dirtyDate, -amount); } module.exports = exports.default;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
index.d.ts
157 B
lrw-r--r--
2026-02-28 00:36:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.32 KB
lrw-r--r--
2026-02-28 00:34:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js.flow
1.38 KB
lrw-r--r--
2026-02-28 00:32:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
98 B
lrw-r--r--
2026-02-28 00:36:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).