NegInfInterval.isAdjacent

bool isAdjacent(scope const Interval!TP interval) const pure

Whether the given interval is adjacent to this interval.

Parameters

intervalThe interval to check whether its adjecent to this interval.

Throws

DateTimeException if the given interval

is empty.

Example: -------------------- assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));

assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( Interval!Date(Date(1999, 1, 12), Date(2012, 3, 1))));

assert(NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( Interval!Date(Date(2012, 3, 1), Date(2019, 2, 2))));

assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( Interval!Date(Date(2022, 10, 19), Date(2027, 6, 3)))); --------------------

bool isAdjacent(scope const PosInfInterval!TP interval) const pure nothrow

Whether the given interval is adjacent to this interval.

Parameters

intervalThe interval to check whether its adjecent to this interval. Example: -------------------- assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( PosInfInterval!Date(Date(1999, 5, 4)))); assert(NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( PosInfInterval!Date(Date(2012, 3, 1)))); --------------------
bool isAdjacent(scope const NegInfInterval interval) const pure nothrow

Whether the given interval is adjacent to this interval.

Always returns false because two intervals beginning at negative infinity can never be adjacent to one another.

Parameters

intervalThe interval to check whether its adjecent to this interval. Example: -------------------- assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( NegInfInterval!Date(Date(1996, 5, 4)))); assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent( NegInfInterval!Date(Date(2012, 3, 1)))); --------------------