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)
  3. bool isAdjacent(NegInfInterval!TP interval)
    struct Interval(TP)
    const pure
    bool
    isAdjacent
    (
    scope const NegInfInterval!TP interval
    )

Parameters

interval NegInfInterval!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(
            NegInfInterval!Date(Date(1996, 1, 2))));

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

Meta