Add days if the result remains a valid datetime.
Synopsis
Declared in <bdlt_datetime.h>
int
addDaysIfValid(int days);
Description
Add the specified number of days to the value of this object, if the resulting value is in the valid range for a Datetime object. Return 0 on success, and a non‐zero value (with no effect) otherwise. Note that this method has no effect on the "time" part of this object. Also note that days may be positive, 0, or negative.
Return Value
0 on success, and a non‐zero value otherwise
Parameters
Name |
Description |
days |
number of days to add (may be negative) |
Created with MrDocs