TimeOfDay.opBinary

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

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

The legal types of arithmetic for TimeOfDay using this operator are

TimeOfDay + Duration --> TimeOfDay
TimeOfDay - Duration --> TimeOfDay
Duration + TimeOfDay --> TimeOfDay

Parameters

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

Gives the difference between two TimeOfDays.

The legal types of arithmetic for TimeOfDay using this operator are

TimeOfDay - TimeOfDay --> duration

Parameters

rhsThe TimeOfDay to subtract from this one.