Skip to content

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.

Parameter Type Description
date Date Gregorian date (local date components are used)
options? HijriOptions Optional day offset for moon-sighting adjustment

HijriDate

Hijri date components

If date is invalid or offset is not an integer