Interval.isBefore

Whether this interval is before the given time point.

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

Parameters

timePoint TP

The time point to check whether this interval is before it.

Throws

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

Examples

assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
            Date(1994, 12, 24)));

assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
            Date(2000, 1, 5)));

assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
            Date(2012, 3, 1)));

Meta