PosInfInterval.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(PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent( Interval!Date(Date(1989, 3, 1), Date(1996, 1, 2))));

assert(!PosInfInterval!Date(Date(1999, 1, 12)).isAdjacent( Interval!Date(Date(1999, 1, 12), Date(2011, 9, 17)))); --------------------

bool isAdjacent(scope const PosInfInterval interval) const pure nothrow

Whether the given interval is adjacent to this interval.

Always returns false because two intervals going to positive infinity can never be adjacent to one another.

Parameters

intervalThe interval to check whether its adjecent to this interval. Example: -------------------- assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent( PosInfInterval!Date(Date(1990, 1, 7)))); assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent( PosInfInterval!Date(Date(1996, 1, 2)))); --------------------
bool isAdjacent(scope const NegInfInterval!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(PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent( NegInfInterval!Date(Date(1996, 1, 2)))); assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent( NegInfInterval!Date(Date(2000, 7, 1)))); --------------------