Add the specified number of hours if the result is valid.

Synopsis

Declared in <bdlt_datetimeinterval.h>

int
addHoursIfValid(bsls::Types::Int64 hours);

Description

Add to this time interval the specified number of hours. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non‐zero value (with no effect) otherwise.

Return Value

0 on success, and a non‐zero value (with no effect) otherwise

Parameters

Name

Description

hours

hours to add

Created with MrDocs