Files
klz-cables.com/.pnpm-store/v10/files/d8/51eb65b5138ff547cc5b12e3d56e25c3e23c678513d0b8a2095c4bc81b49ca57982e4abba99b522907fa24f22a5421b997d4bbe3a315fa2650744ad48046bd
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

34 lines
1.3 KiB
Plaintext

"use strict";
exports.subBusinessDays = subBusinessDays;
var _index = require("./addBusinessDays.cjs");
/**
* The {@link subBusinessDays} function options.
*/
/**
* @name subBusinessDays
* @category Day Helpers
* @summary Subtract the specified number of business days (mon - fri) from the given date.
*
* @description
* Subtract the specified number of business days (mon - fri) from the given date, ignoring weekends.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of business days to be subtracted.
* @param options - An object with options
*
* @returns The new date with the business days subtracted
*
* @example
* // Subtract 10 business days from 1 September 2014:
* const result = subBusinessDays(new Date(2014, 8, 1), 10)
* //=> Mon Aug 18 2014 00:00:00 (skipped weekend days)
*/
function subBusinessDays(date, amount, options) {
return (0, _index.addBusinessDays)(date, -amount, options);
}