Function: addHijriBusinessDays()
@taqwim/core / addHijriBusinessDays
addHijriBusinessDays(
date,amount,options):HijriDateObject
Defined in: packages/core/src/lib/addHijriBusinessDays.ts:33
Parameters
Section titled “Parameters”HijriDateObject
The date to be changed
amount
Section titled “amount”number
The amount of business days to be added.
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 added, or null if date is invalid.
addHijriBusinessDays
Description
Section titled “Description”Add the specified number of business days to the given date, skipping weekend days. The weekend defaults to Friday/Saturday — the working week across most of the Arab world — and is configurable.
Examples
Section titled “Examples”// Add 20 business days to 1 Ramadan 1445addHijriBusinessDays({ hy: 1445, hm: 9, hd: 1 }, 20)//=> { hy: 1445, hm: 9, hd: 29 }// Western Saturday/Sunday weekendaddHijriBusinessDays({ hy: 1445, hm: 9, hd: 1 }, 5, { weekend: [6, 0] })