dateOnly function

Jalali? dateOnly(
  1. Jalali? date
)

Returns a Jalali with just the date of the original, but no time set.

Implementation

Jalali? dateOnly(Jalali? date) {
  if (date == null) return date;
  return Jalali(date.year, date.month, date.day);
}