daysInRange static method

List<DateTime> daysInRange(
  1. DateTime first,
  2. DateTime last
)

Implementation

static List<DateTime> daysInRange(DateTime first, DateTime last) {
  final dayCount = last.difference(first).inDays + 1;

  return List.generate(
    dayCount,
    (index) => DateTime.utc(first.year, first.month, first.day + index),
  );
}