Jalali.fromGregorian constructor

Jalali.fromGregorian(
  1. Gregorian date
)

Create a Jalali date from Gregorian date

throws on null argument

non-null

Implementation

factory Jalali.fromGregorian(Gregorian date) {
  ArgumentError.checkNotNull(date, 'date');

  return Jalali.fromJulianDayNumber(date.julianDayNumber);
}