Return the sum of a datetime and a time interval.
Declared in <bdlt_datetime.h>
bdlt::Datetime
operator+(
Datetime const& lhs,
bsls::TimeInterval const& rhs);
Return a Datetime object having a value that is the sum of the specified lhs (Datetime) and the specified rhs (bsls::TimeInterval). If 24 == lhs.hour(), the result is the same as if the hour attribute of lhs is 0. The behavior is undefined unless the resulting value is in the valid range for a Datetime object.
a Datetime that is the sum of the operands
| Name | Description |
|---|---|
| lhs | datetime operand |
| rhs | time interval to add |