Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
        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);
        }