contains method

bool contains(
  1. DateTime dateTime
)

Returns true if dateTime is between from and to (inclusive)

Implementation

bool contains(DateTime dateTime) => from <= dateTime && dateTime <= to;