Interval.isAdjacent

bool isAdjacent(scope const Interval 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 either interval is

empty.

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

assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent( Interval!Date(Date(2012, 3, 1), Date(2013, 9, 17))));

assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent( Interval!Date(Date(1989, 3, 1), Date(2012, 3, 1)))); --------------------

bool isAdjacent(scope const PosInfInterval!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 this interval is

empty.

Example: -------------------- assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent( PosInfInterval!Date(Date(1999, 5, 4))));

assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent( PosInfInterval!Date(Date(2012, 3, 1)))); --------------------

bool isAdjacent(scope const NegInfInterval!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 this interval is

empty.

Example: -------------------- assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent( NegInfInterval!Date(Date(1996, 1, 2))));

assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent( NegInfInterval!Date(Date(2000, 1, 2)))); --------------------