NegInfInterval.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. NegInfInterval span(Interval!TP interval)
  2. NegInfInterval span(NegInfInterval interval)
    struct NegInfInterval(TP)
    const pure nothrow
    span
    ()

Parameters

interval NegInfInterval

The interval to create a span together with this interval.

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

Examples

assert(NegInfInterval!Date(Date(2012, 3, 1)).span(
            NegInfInterval!Date(Date(1999, 7, 6))) ==
       NegInfInterval!Date(Date(2012, 3 , 1)));

assert(NegInfInterval!Date(Date(2012, 3, 1)).span(
            NegInfInterval!Date(Date(2013, 1, 12))) ==
       NegInfInterval!Date(Date(2013, 1 , 12)));

Meta