overlaps method

bool overlaps(
  1. TimeSlot other
)

Returns true if this time slot overlaps with other.

Implementation

bool overlaps(TimeSlot other) {
  return start.isBefore(other.end) && end.isAfter(other.start);
}