hijri-core/.github/wiki/api/interfaces/CalendarEngine.md
Aric Camarata 235ffb8851 docs: add TypeDoc API generation (typedoc@0.28.19 + typedoc-plugin-markdown@4.11.0)
Add typedoc and typedoc-plugin-markdown as devDependencies. Add typedoc.json config
targeting src/index.ts with markdown output to .github/wiki/api. Add docs script to
package.json. Generate initial API reference pages.

Part of T-E8-03 — TypeDoc automation for all 12 JS/TS packages.
2026-05-30 16:41:58 -04:00

2 KiB

hijri-core v1.0.1


hijri-core / CalendarEngine

Interface: 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.

Properties

id

readonly id: string

Defined in: types.ts:43

Methods

daysInMonth()

daysInMonth(hy, hm): number

Defined in: types.ts:48

Parameters

hy

number

hm

number

Returns

number


isValid()

isValid(hy, hm, hd): boolean

Defined in: types.ts:47

Parameters

hy

number

hm

number

hd

number

Returns

boolean


toGregorian()

toGregorian(hy, hm, hd): Date | null

Defined in: types.ts:46

Returns null for invalid or out-of-range input. Never throws.

Parameters

hy

number

hm

number

hd

number

Returns

Date | null


toHijri()

toHijri(date): HijriDate | null

Defined in: types.ts:44

Parameters

date

Date

Returns

HijriDate | null