addDays function

dynamic addDays(
  1. dynamic date,
  2. int days
)

Return date value without hour and minutes consideration.

Implementation

dynamic addDays(dynamic date, int days) {
  if (date is HijriDateTime) {
    return date.add(Duration(days: days));
  }

  return DateTime(date.year, date.month, date.day + days);
}