The number of years to shift the interval by.
The number of months to shift the interval by.
Whether the days should be allowed to overflow on end, causing its month to increment.
std.datetime.date.DateTimeException if empty is true or if the resulting interval would be invalid.
auto interval1 = NegInfInterval!Date(Date(2012, 3, 1)); auto interval2 = NegInfInterval!Date(Date(2012, 3, 1)); interval1.shift(2); assert(interval1 == NegInfInterval!Date(Date(2014, 3, 1))); interval2.shift(-2); assert(interval2 == NegInfInterval!Date(Date(2010, 3, 1)));
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.