Unary minus operators

Synopses

Declared in <bdlt_date.h>

Return a DatetimeInterval object whose value is the negative of the specified time interval value. The behavior is undefined unless INT_MIN < value.days().

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

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

Return the signed number of days between two dates.

int
operator‐(
    Date const& lhs,
    Date const& rhs);

Return the interval between two datetimes.

Return the difference of a datetime and a datetime interval.

Return the difference of a datetime and a time interval.

Return the difference between the specified lhs and rhs intervals.

Return a set containing the subtraction of the specified rhs set from the specified lhs set (i.e., a set containing elements that are in lhs, but not in rhs).

Return the number of holiday codes between lhs and rhs.

Return a Time value that is the difference between the specified lhs time and the specified rhs datetime interval.

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

Return a DatetimeInterval object initialized with the difference between the specified lhs and rhs time values.

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

Return Value

  • the negation of value

  • date earlier by numDays from date

  • number of days from rhs to lhs

  • a DatetimeInterval that is the difference between the operands

  • a Datetime that is the difference of the operands

  • the difference between lhs and rhs

  • a set containing the subtraction of rhs from lhs

  • the number of holiday codes between lhs and rhs

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

  • a DatetimeInterval initialized with the difference of lhs and rhs

Parameters

Name

Description

value

time interval to negate

date

base date

numDays

signed number of days to subtract

lhs

left‐hand date operand

rhs

right‐hand date operand

Created with MrDocs