-
Notifications
You must be signed in to change notification settings - Fork 0
CalendarEngine
hijri-core / CalendarEngine
Defined in: types.ts:42
Interface every calendar engine must implement.
Return null when a date is outside the engine's supported range.
Throw Error for structurally invalid input (malformed Date, month outside 1-12, etc.).
Never throw for out-of-range inputs — return null instead so callers can handle
the boundary gracefully without try/catch.
readonlyid:string
Defined in: types.ts:43
daysInMonth(
hy,hm):number
Defined in: types.ts:48
number
number
number
isValid(
hy,hm,hd):boolean
Defined in: types.ts:47
number
number
number
boolean
toGregorian(
hy,hm,hd):Date|null
Defined in: types.ts:46
Returns null for invalid or out-of-range input. Never throws.
number
number
number
Date | null
toHijri(
date):HijriDate|null
Defined in: types.ts:44
Date
HijriDate | null
Reference
API
- toHijri
- toGregorian
- isValidHijriDate
- daysInHijriMonth
- registerCalendar
- getCalendar
- listCalendars
- hDatesTable
- hmLong / hmMedium / hmShort
- hwLong / hwShort / hwNumeric
Guides
Examples
Contributing
Links