NegInfInterval

Represents an interval of time which has negative infinity as its starting point.

Any ranges which iterate over a NegInfInterval are infinite. So, the main purpose of using NegInfInterval is to create an infinite range which starts at negative infinity and goes to a fixed end point. Iterate over it in reverse.

struct NegInfInterval (
TP
) {}

Constructors

this
this(TP end)

Members

Functions

bwdRange
NegInfIntervalRange!(TP) bwdRange(TP delegate(scope const TP) func, PopFirst popFirst)

Returns a range which iterates backwards over the interval, starting at end, using func to generate each successive time point.

contains
bool contains(TP timePoint)

Whether the given time point is within this interval.

contains
bool contains(Interval!TP interval)

Whether the given interval is completely within this interval.

contains
bool contains(PosInfInterval!TP interval)

Whether the given interval is completely within this interval.

contains
bool contains(NegInfInterval interval)

Whether the given interval is completely within this interval.

expand
void expand(T years, T months, AllowDayOverflow allowOverflow)

Expands the interval forwards and/or backwards in time. Effectively, it adds the given number of months/years to end.

expand
void expand(D duration)

Expands the interval forwards in time. Effectively, it does end += duration.

intersection
Interval!TP intersection(Interval!TP interval)

Returns the intersection of two intervals

intersection
Interval!TP intersection(PosInfInterval!TP interval)

Returns the intersection of two intervals

intersection
NegInfInterval intersection(NegInfInterval interval)

Returns the intersection of two intervals

intersects
bool intersects(Interval!TP interval)

Whether the given interval overlaps this interval.

intersects
bool intersects(PosInfInterval!TP interval)

Whether the given interval overlaps this interval.

intersects
bool intersects(NegInfInterval!TP interval)

Whether the given interval overlaps this interval.

isAdjacent
bool isAdjacent(Interval!TP interval)

Whether the given interval is adjacent to this interval.

isAdjacent
bool isAdjacent(PosInfInterval!TP interval)

Whether the given interval is adjacent to this interval.

isAdjacent
bool isAdjacent(NegInfInterval interval)

Whether the given interval is adjacent to this interval.

isAfter
bool isAfter(TP timePoint)

Whether this interval is after the given time point.

isAfter
bool isAfter(Interval!TP interval)

Whether this interval is after the given interval and does not intersect it.

isAfter
bool isAfter(PosInfInterval!TP interval)

Whether this interval is after the given interval and does not intersect it.

isAfter
bool isAfter(NegInfInterval interval)

Whether this interval is after the given interval and does not intersect it.

isBefore
bool isBefore(TP timePoint)

Whether this interval is before the given time point.

isBefore
bool isBefore(Interval!TP interval)

Whether this interval is before the given interval and does not intersect it.

isBefore
bool isBefore(PosInfInterval!TP interval)

Whether this interval is before the given interval and does not intersect it.

isBefore
bool isBefore(NegInfInterval interval)

Whether this interval is before the given interval and does not intersect it.

merge
NegInfInterval merge(Interval!TP interval)

Returns the union of two intervals

merge
NegInfInterval merge(NegInfInterval interval)

Returns the union of two intervals

opAssign
NegInfInterval opAssign(NegInfInterval rhs)
opAssign
NegInfInterval opAssign(NegInfInterval rhs)
shift
void shift(D duration)

Shifts the end of this interval forward or backwards in time by the given duration (a positive duration shifts the interval forward; a negative duration shifts it backward). Effectively, it does end += duration.

shift
void shift(T years, T months, AllowDayOverflow allowOverflow)

Shifts the end of this interval forward or backwards in time by the given number of years and/or months (a positive number of years and months shifts the interval forward; a negative number shifts it backward). It adds the years the given years and months to end. It effectively calls add!"years"() and then add!"months"() on end with the given number of years and months.

span
NegInfInterval span(Interval!TP interval)

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.

span
NegInfInterval span(NegInfInterval interval)

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.

toString
string toString()

Converts this interval to a string.

Properties

end
TP end [@property getter]

The end point of the interval. It is excluded from the interval.

end
TP end [@property setter]

The end point of the interval. It is excluded from the interval.

Variables

empty
enum bool empty;

Whether the interval's length is 0. Always returns false.

Meta