Interval.contains

Whether the given interval is completely within this interval.

Always returns false (unless this interval is empty), because an interval beginning at negative 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)
  4. bool contains(NegInfInterval!TP interval)
    struct Interval(TP)
    const pure
    bool
    contains
    (
    scope const NegInfInterval!TP interval
    )

Parameters

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

Meta