contains method

bool contains(
  1. DateTime date
)

Returns true if this contains the given date. If the date is equal to the start or end or is between the two dates, it will return true.

Implementation

bool contains(DateTime date) {
  return (startsBefore(date) || date.isAtSameMomentAs(start)) &&
      (endsAfter(date) || date.isAtSameMomentAs(end));
}