Function: subHijriWeeks()
@taqwim/core / subHijriWeeks
subHijriWeeks(
date,amount):HijriDateObject
Defined in: packages/core/src/lib/subHijriWeeks.ts:19
Substracts a specified number of weeks from a Hijri date.
Parameters
Section titled “Parameters”HijriDateObject
The Hijri date object to sub weeks to.
amount
Section titled “amount”number
The number of weeks to sub.
Returns
Section titled “Returns”HijriDateObject
The resulting Hijri date object after subing the specified number of weeks, or null if the input date is invalid.
Example
Section titled “Example”// Substract 10 weeks from 1 Ramadan 1445 ({ hy: 1445, hm: 9, hd: 1 })const result = subHijriWeeks({ hy: 1445, hm: 11, hd: 12 },10);//=> { hy: 1445, hm: 9, hd: 1 }