toHijri
function toHijri(date, options?): HijriDate;Defined in: hijri.ts:45
Converts a Gregorian Date to a Hijri (Islamic) date.
Uses the tabular (arithmetic, “islamic-civil”) calendar. Actual dates in
Pakistan follow moon sighting and can differ by a day or two; pass
options.offset to adjust.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
date |
Date |
Gregorian date (local date components are used) |
options? |
HijriOptions |
Optional day offset for moon-sighting adjustment |
Returns
Section titled “Returns”Hijri date components
Throws
Section titled “Throws”If date is invalid or offset is not an integer