PosInfInterval.span

Returns an interval that covers from the earliest time point of two intervals up to (but not including) the latest time point of two intervals.

  1. PosInfInterval span(Interval!TP interval)
  2. PosInfInterval span(PosInfInterval interval)
    struct PosInfInterval(TP)
    const pure nothrow
    span
    ()

Parameters

interval PosInfInterval

The interval to create a span together with this interval.

Note: There is no overload for span which takes a NegInfInterval, because an interval going from negative infinity to positive infinity is not possible.

Examples

assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
            PosInfInterval!Date(Date(1990, 7, 6))) ==
       PosInfInterval!Date(Date(1990, 7 , 6)));

assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
            PosInfInterval!Date(Date(1999, 1, 12))) ==
       PosInfInterval!Date(Date(1996, 1 , 2)));

Meta