DateRangeOverlaps(DateRange) Method |
Namespace: InnerDrive.CoreAssembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.0.8475.0
Syntax Remarks
A
DateRange overlaps another
DateRange when the any part of one
DateRange is contained
within the other.
DateRange A | DateRange B | A.Overlaps(B)? |
---|
Jan 1-Jan 31 | Dec 1-Dec 31 | false |
Jan 1-Jan 31 | Dec 1-Jan 1 | * |
Jan 1-Jan 31 | Dec 15-Jan 15 | true |
Jan 1-Jan 31 | Jan 1-Jan 31 | true |
Jan 1-Jan 31 | Jan 15-Feb 15 | true |
Jan 1-Jan 31 | Jan 31-Feb 28 | * |
Jan 1-Jan 31 | Feb 1-Feb 28 | false |
* The behavior of Overlaps depends on whether the ranges are inclusive. Also,
the results of RangeA.Overlaps(RangeB) and RangeB.Overlaps(RangeA) must always return
the same value. Therefore, the following shows the behavior of two adjacent ranges. Assume
RangeA = { 16:00 - 18:00 } and RangeB = { 18:00 - 20:00 }.
Orthogonal ranges always overlap, regardless of their IsLowerInclusive and
IsUpperInclusive values.
See Also