DateTime.opOpAssign

DateTime opOpAssign(string op)(Duration duration) if (op == "+" || op == "-") ref @safe pure nothrow @nogc

Gives the result of adding or subtracting a duration from this DateTime, as well as assigning the result to this DateTime.

The legal types of arithmetic for DateTime using this operator are

DateTime + duration --> DateTime
DateTime - duration --> DateTime

Parameters

durationThe duration to add to or subtract from this DateTime.