PosInfInterval.expand
void expand(D)(D duration) if (__traits(compiles, begin + duration)) pure nothrowExpands the interval backwards in time. Effectively, it does
begin -= duration.
Parameters
duration | The duration to expand the interval by. Example: -------------------- auto interval1 = PosInfInterval!Date(Date(1996, 1, 2)); auto interval2 = PosInfInterval!Date(Date(1996, 1, 2)); interval1.expand(dur!"days"(2)); assert(interval1 == PosInfInterval!Date(Date(1995, 12, 31))); interval2.expand(dur!"days"(-2)); assert(interval2 == PosInfInterval!Date(Date(1996, 1, 4))); -------------------- |