overlapsWith method

bool overlapsWith(
  1. Period other
)

Returns true if this overlaps with other.

Implementation

bool overlapsWith(Period other) {
  return (contains(other.start) || contains(other.end)) ||
      (other.contains(start) || other.contains(end));
}