Function: addHijri()
@taqwim/core / addHijri
addHijri(
date,duration):HijriDateObject
Defined in: packages/core/src/lib/addHijri.ts:25
Adds a Hijri duration to a given Hijri date.
Parameters
Section titled “Parameters”HijriDateObject
The Hijri date to which the duration will be added.
duration
Section titled “duration”HijriDuration
The Hijri duration to add.
Returns
Section titled “Returns”HijriDateObject
The new Hijri date after adding the duration.
Examples
Section titled “Examples”// Add 10 days to 1 Ramadan 1445 ({ hy: 1445, hm: 9, hd: 1 })const result = addHijri({ hy: 1445, hm: 9, hd: 1 },{ years: 0, months: 0, weeks: 0, days: 10 })//=> { hy: 1445, hm: 9, hd: 11 }// Add 1 year, 2 months, 3 weeks, and 4 days to 1 Ramadan 1445 ({ hy: 1445, hm: 9, hd: 1 })const result = addHijri({ hy: 1445, hm: 9, hd: 1 },{ years: 1, months: 2, weeks: 3, days: 4 })//=> { hy: 1446, hm: 11, hd: 25 }