getBtwDates method

List<DateTime> getBtwDates({
  1. required DateTime end,
})

Implementation

List<DateTime> getBtwDates({required DateTime end}) {
  DateTime startDate = this.tomorrow();
  DateTime endDate = end.yesterday();
  List<DateTime> days = [];
  for (int i = 0; i <= endDate.difference(startDate).inDays; i++) {
    days.add(DateTime(startDate.year, startDate.month, startDate.day + i));
  }

  return days;
}