hijri-core/.github/wiki/api/functions/toGregorian.md

722 B

hijri-core v1.0.1


hijri-core / toGregorian

Function: toGregorian()

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

Defined in: index.ts:60

Convert a Hijri date to a Gregorian date.

Uses the UAQ calendar by default.

Parameters

hy

number

Hijri year

hm

number

Hijri month (1-12)

hd

number

Hijri day (1-30)

options?

ConversionOptions

conversion options (calendar engine selection)

Returns

Date | null

a Date in UTC, or null if the input is invalid or out of range