Date.add

Date add(string units)(long value, AllowDayOverflow allowOverflow = AllowDayOverflow.yes) if (units == "years") @safe pure nothrow @nogc ref

Adds the given number of years or months to this Date, mutating it. A negative number will subtract.

Note that if day overflow is allowed, and the date with the adjusted year/month overflows the number of days in the new month, then the month will be incremented by one, and the day set to the number of days overflowed. (e.g. if the day were 31 and the new month were June, then the month would be incremented to July, and the new day would be 1). If day overflow is not allowed, then the day will be set to the last valid day in the month (e.g. June 31st would become June 30th).

Parameters

unitsThe type of units to add ("years" or "months").
valueThe number of months or years to add to this Date.
allowOverflowWhether the day should be allowed to overflow, causing the month to increment.

Returns

A reference to the Date (this).
Date add(string units)(long months, AllowDayOverflow allowOverflow = AllowDayOverflow.yes) if (units == "months") @safe pure nothrow @nogc ref
No documentation available for this declaration.