public bool Overlaps(TimeRange other) { return ContainsWithin(other.Start) || ContainsWithin(other.End) || other.ContainsWithin(Start) || other.ContainsWithin(End); }
public TimeSpan DistanceFrom(TimeRange other) { if (End < other.Start) { return other.Start - End; } if (Start > other.End) { return Start - other.End; } return EmptyTime; }