contains method

bool contains(
  1. DateTime date
)

Check if a date is within this range (inclusive).

Implementation

bool contains(DateTime date) =>
    (date.isAfter(start) || date.isAtSameMomentAs(start)) &&
    (date.isBefore(end) || date.isAtSameMomentAs(end));