daysInRange method

Iterable<DateTime> daysInRange (DateTime start DateTime end)

Returns a DateTime for each day the given range.

start is inclusive and end is exclusive

Implementation

static Iterable<DateTime> daysInRange(DateTime start, DateTime end) sync* {
  var temp = start;

  while (temp.isBefore(end)) {
    yield normalizeDate(temp);
    temp = temp.add(const Duration(days: 1));
  }
}