std.datetime.interval

Members

Aliases

PopFirst
alias PopFirst = Flag!"popFirst"

Used to indicate whether popFront should be called immediately upon creating a range. The idea is that for some functions used to generate a range for an interval, front is not necessarily a time point which would ever be generated by the range (e.g. if the range were every Sunday within an interval, but the interval started on a Monday), so there needs to be a way to deal with that. To get the first time point in the range to match what the function generates, then use PopFirst.yes to indicate that the range should have popFront called on it before the range is returned so that front is a time point which the function would generate. To let the first time point not match the generator function, use PopFront.no.

Enums

Direction
enum Direction

Indicates a direction in time. One example of its use is Interval's expand function which uses it to indicate whether the interval should be expanded backwards (into the past), forwards (into the future), or both.

Functions

everyDayOfWeek
TP delegate(scope const TP) everyDayOfWeek(DayOfWeek dayOfWeek)

Range-generating function.

everyDuration
TP delegate(return scope const TP) everyDuration(D duration)

Range-generating function.

everyDuration
TP delegate(scope const TP) everyDuration(int years, int months, AllowDayOverflow allowOverflow, D duration)

Range-generating function.

everyMonth
TP delegate(scope const TP) everyMonth(int month)

Range-generating function.

Structs

Interval
struct Interval(TP)

Represents an interval of time.

IntervalRange
struct IntervalRange(TP, Direction dir)

A range over an Interval.

NegInfInterval
struct NegInfInterval(TP)

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

NegInfIntervalRange
struct NegInfIntervalRange(TP)

A range over a NegInfInterval. It is an infinite range.

PosInfInterval
struct PosInfInterval(TP)

Represents an interval of time which has positive infinity as its end point.

PosInfIntervalRange
struct PosInfIntervalRange(TP)

A range over a PosInfInterval. It is an infinite range.

Meta