Addition operators

Synopses

Declared in <bdlt_date.h>

Return the date that is later by numDays from the specified date.

bdlt::Date
operator+(
    int numDays,
    Date const& date);

Return the date that is later by numDays from the specified date.

bdlt::Date
operator+(
    Date const& date,
    int numDays);

Return the sum of a datetime and a datetime interval.

Return the sum of a datetime and a time interval.

Return the sum of a datetime interval and a datetime.

Return the sum of the specified lhs and rhs time intervals.

Return a Time value that is the sum of the specified lhs datetime interval and the specified rhs time.

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

Return a Time value that is the sum of the specified lhs time and the specified rhs datetime interval.

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

Return the sum of a time interval and a datetime.

Return Value

  • date later by numDays from date

  • a Datetime that is the sum of the operands

  • the sum of lhs and rhs

  • a Time value that is the sum of lhs and rhs

Parameters

Name

Description

numDays

signed number of days to add

date

base date

lhs

datetime operand

rhs

datetime interval to add

Created with MrDocs