public bool Intersects(FoundationDateTimeInterval other) { var start = ElementPair.Max(Start, other.Start); var end = ElementPair.Min(End, other.End); var intersects = start < end; return(intersects); }
public FoundationDateTimeInterval?Intersect(FoundationDateTimeInterval other) { var start = ElementPair.Max(Start, other.Start); var end = ElementPair.Min(End, other.End); var intersects = start < end; return(intersects ? new FoundationDateTimeInterval(start, end) : (FoundationDateTimeInterval?)null); }
public bool Contains(FoundationDateTimeInterval other) => Start <= other.Start && other.End <= End;