Date.opBinary

Date opBinary(string op)(Duration duration) if (op == "+" || op == "-") const @safe pure nothrow @nogc

Gives the result of adding or subtracting a Duration from this Date.

The legal types of arithmetic for Date using this operator are

Date + Duration --> Date
Date - Duration --> Date
Duration + Date --> Date

Parameters

durationThe Duration to add to or subtract from this Date.
Duration opBinary(string op)(Date rhs) if (op == "-") const @safe pure nothrow @nogc

Gives the difference between two Dates.

The legal types of arithmetic for Date using this operator are

Date - Date --> duration