SysTime.roll

SysTime roll(string units)(long value, AllowDayOverflow allowOverflow = AllowDayOverflow.yes) if (units == "years") ref @safe nothrow scope

Adds the given number of years or months to this SysTime. A negative number will subtract.

The difference between rolling and adding is that rolling does not affect larger units. Rolling a SysTime 12 months gets the exact same SysTime. However, the days can still be affected due to the differing number of days in each month.

Because there are no units larger than years, there is no difference between adding and rolling years.

Parameters

unitsThe type of units to add ("years" or "months").
valueThe number of months or years to add to this SysTime.
allowOverflowWhether the days should be allowed to overflow, causing the month to increment.
SysTime roll(string units)(long value, AllowDayOverflow allowOverflow = AllowDayOverflow.yes) if (units == "months") ref @safe nothrow scope
No documentation available for this declaration.
SysTime roll(string units)(long value) if (units == "days") ref @safe nothrow scope

Adds the given number of units to this SysTime. A negative number will subtract.

The difference between rolling and adding is that rolling does not affect larger units. For instance, rolling a SysTime one year's worth of days gets the exact same SysTime.

Accepted units are "days", "minutes", "hours", "minutes", "seconds", "msecs", "usecs", and "hnsecs".

Note that when rolling msecs, usecs or hnsecs, they all add up to a second. So, for example, rolling 1000 msecs is exactly the same as rolling 100,000 usecs.

Parameters

unitsThe units to add.
valueThe number of units to add to this SysTime.
SysTime roll(string units)(long value) if (units == "hours" || units == "minutes" || units == "seconds") ref @safe nothrow scope
No documentation available for this declaration.
SysTime roll(string units)(long value) if (units == "msecs" || units == "usecs" || units == "hnsecs") ref @safe nothrow scope
No documentation available for this declaration.