Function: subHijriBusinessDays()
@taqwim/core / subHijriBusinessDays
subHijriBusinessDays(
date,amount,options):HijriDateObject
Defined in: packages/core/src/lib/subHijriBusinessDays.ts:23
Subtract the specified number of business days from the given date, skipping weekend days. The weekend defaults to Friday/Saturday — the working week across most of the Arab world — and is configurable.
Parameters
Section titled “Parameters”HijriDateObject
The date to be changed
amount
Section titled “amount”number
The amount of business days to be subtracted.
options
Section titled “options”BusinessDayOptions = {}
Business-day options, e.g. { weekend: [6, 0] } for a Sat/Sun weekend.
Returns
Section titled “Returns”HijriDateObject
The new date with the business days subtracted, or null if date is invalid.
Example
Section titled “Example”// Subtract 10 business days from 1 Ramadan 1445subHijriBusinessDays({ hy: 1445, hm: 9, hd: 1 }, 10)//=> { hy: 1445, hm: 8, hd: 16 }