BloombergLP::bdlt::operator-

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().

bdlt::DatetimeInterval
operator-(DatetimeInterval const& value);
» more...

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

bdlt::Date
operator-(
    Date const& date,
    int numDays);
» more...

Return the signed number of days between two dates.

int
operator-(
    Date const& lhs,
    Date const& rhs);
» more...

Return the interval between two datetimes.

bdlt::DatetimeInterval
operator-(
    Datetime const& lhs,
    Datetime const& rhs);
» more...

Return the difference of a datetime and a datetime interval.

bdlt::Datetime
operator-(
    Datetime const& lhs,
    DatetimeInterval const& rhs);
» more...

Return the difference of a datetime and a time interval.

bdlt::Datetime
operator-(
    Datetime const& lhs,
    bsls::TimeInterval const& rhs);
» more...

Return the difference between the specified lhs and rhs intervals.

bdlt::DatetimeInterval
operator-(
    DatetimeInterval const& lhs,
    DatetimeInterval const& rhs);
» more...

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).

bdlt::DayOfWeekSet
operator-(
    DayOfWeekSet const& lhs,
    DayOfWeekSet const& rhs);
» more...

Return the number of holiday codes between lhs and rhs.

std::ptrdiff_t
operator-(
    PackedCalendar_HolidayCodeConstIterator const& lhs,
    PackedCalendar_HolidayCodeConstIterator const& rhs);
» more...

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);
» more...

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);
» more...

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

NameDescription
valuetime interval to negate
datebase date
numDayssigned number of days to subtract
lhsleft-hand date operand
rhsright-hand date operand