Set the hour attribute if it is in range.
Synopsis
Declared in <bdlt_datetime.h>
int
setHourIfValid(int hour);
Description
Set the "hour" attribute of this object to the specified hour value if 0 <= hour <= 24. If 24 == hour, set the minute, second, millisecond, and microsecond attributes to 0. Return 0 on success, and a non‐zero value (with no effect) otherwise. Note that this method has no effect on the "date" part of this object.
Return Value
0 on success, and a non‐zero value otherwise
Parameters
Name |
Description |
hour |
hour attribute to set |
Created with MrDocs