v1.0 with SW PWA enabled
This commit is contained in:
28
frontend/node_modules/date-fns/subBusinessDays.mjs
generated
vendored
Normal file
28
frontend/node_modules/date-fns/subBusinessDays.mjs
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import { addBusinessDays } from "./addBusinessDays.mjs";
|
||||
|
||||
/**
|
||||
* @name subBusinessDays
|
||||
* @category Day Helpers
|
||||
* @summary Substract the specified number of business days (mon - fri) to the given date.
|
||||
*
|
||||
* @description
|
||||
* Substract the specified number of business days (mon - fri) to 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).
|
||||
*
|
||||
* @param date - The date to be changed
|
||||
* @param amount - The amount of business days to be subtracted.
|
||||
*
|
||||
* @returns The new date with the business days subtracted
|
||||
*
|
||||
* @example
|
||||
* // Substract 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)
|
||||
*/
|
||||
export function subBusinessDays(date, amount) {
|
||||
return addBusinessDays(date, -amount);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default subBusinessDays;
|
||||
Reference in New Issue
Block a user