PersianDateTime extension

Converts a DateTime to a PersianDate or a HijriDate.

on

Methods

toHijriDate() → HijriDate

Available on DateTime, provided by the PersianDateTime extension

Returns the lunar Hijri date of this calendar day; the same as HijriDate.fromDateTime.
toPersianDate() → PersianDate

Available on DateTime, provided by the PersianDateTime extension

Returns this moment as a PersianDate, keeping the time of day; the same as PersianDate.fromDateTime.