The OpenD Programming Language

Interval.isAdjacent

Whether the given interval is adjacent to this interval.

  1. bool isAdjacent(Interval interval)
  2. bool isAdjacent(PosInfInterval!TP interval)
    struct Interval(TP)
    const pure
    bool
    isAdjacent
    (
    scope const PosInfInterval!TP interval
    )
  3. bool isAdjacent(NegInfInterval!TP interval)

Parameters

interval PosInfInterval!TP

The interval to check whether its adjecent to this interval.

Throws

std.datetime.date.DateTimeException if this interval is empty.

Examples

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))));

Meta