isBetween static method

bool isBetween(
  1. DateTime date,
  2. DateTime start,
  3. DateTime end
)

Checks if the given DateTime is between the start and end DateTimes (exclusive).

Implementation

static bool isBetween(DateTime date, DateTime start, DateTime end) {
  return date.isAfter(start) && date.isBefore(end);
}