public bool Intersects(SmallDateInterval other) { var start = ElementPair.Max(Start, other.Start); var end = ElementPair.Min(End, other.End); var intersects = start <= end; return(intersects); }
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 SmallDateInterval?Intersect(SmallDateInterval other) { var start = ElementPair.Max(Start, other.Start); var end = ElementPair.Min(End, other.End); var intersects = start <= end; return(intersects ? new SmallDateInterval(start, end) : (SmallDateInterval?)null); }
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); }