fromDateTime method

HijriDate fromDateTime(
  1. DateTime dateTime
)

The Hijri date of the calendar day of dateTime on this calendar; the time of day is ignored.

Throws ArgumentError outside the supported range.

Implementation

HijriDate fromDateTime(DateTime dateTime) {
  final jdn = g2d(dateTime.year, dateTime.month, dateTime.day);
  _checkRange(jdn);
  return _fromJulianDay(jdn);
}