Return the sum of a datetime interval and a datetime.

Synopsis

Declared in <bdlt_datetime.h>

bdlt::Datetime
operator+(
    DatetimeInterval const& lhs,
    Datetime const& rhs);

Description

Return a Datetime object having a value that is the sum of the specified lhs (DatetimeInterval) and the specified rhs (Datetime). If 24 == rhs.hour(), the result is the same as if the hour attribute of rhs is 0. The behavior is undefined unless the resulting value is in the valid range for a Datetime object.

Return Value

a Datetime that is the sum of the operands

Parameters

Name

Description

lhs

datetime interval to add

rhs

datetime operand

Created with MrDocs