isBetween method

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

Whether this date falls between start and end (inclusive).

Implementation

bool isBetween(DateTime start, DateTime end) =>
    !isBefore(start) && !isAfter(end);