Interval.this

  1. this(TP begin, U end)
  2. this(TP begin, D duration)
    struct Interval(TP)
    pure
    this
    (
    D
    )
    (
    scope const TP begin
    ,
    scope const D duration
    )
    if (
    __traits(compiles, begin + duration)
    )

Parameters

begin TP

The time point which begins the interval.

duration D

The duration from the starting point to the end point.

Throws

std.datetime.date.DateTimeException if the resulting end is before begin.

Examples

assert(Interval!Date(Date(1996, 1, 2), dur!"days"(3)) ==
       Interval!Date(Date(1996, 1, 2), Date(1996, 1, 5)));

Meta