示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public bool Contains(FoundationDateTimeInterval other) => Start <= other.Start && other.End <= End;