mirror of
https://github.com/acamarata/hijri-core.git
synced 2026-07-01 11:14:28 +00:00
883 B
883 B
hijri-core / toHijri
Function: toHijri()
toHijri(
date,options?):HijriDate|null
Defined in: index.ts:42
Convert a Gregorian date to a Hijri date.
Uses the UAQ (Umm al-Qura) calendar by default. Pass { calendar: 'fcna' }
or any registered calendar name via options to use a different engine.
Parameters
date
Date
a valid JavaScript Date object
options?
conversion options (calendar engine selection)
Returns
HijriDate | null
the corresponding Hijri date, or null if the date is out of range
Throws
if date is not a valid Date instance