The OpenD Programming Language

Interval.contains

Whether the given interval is completely within this interval.

Always returns false (unless this interval is empty), because an interval going to positive infinity can never be contained in a finite interval.

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

Parameters

interval PosInfInterval!TP

The interval to check for inclusion in this interval.

Throws

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

Examples

assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
            PosInfInterval!Date(Date(1999, 5, 4))));

Meta