UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

12 lines (11 loc) 392 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.subtractFromDate = void 0; const modify_date_js_1 = require("./modify-date.js"); /** * Subtracts from a date by a given amount of time units */ function subtractFromDate(date, amount, unit) { return (0, modify_date_js_1.modifyDate)(date, -amount, unit); } exports.subtractFromDate = subtractFromDate;