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 value that is earlier by the specified (signed) numDays from the specified date. The behavior is undefined unless the resulting value falls within the range of dates supported by this class (see isValidYearMonthDay). Note that numDays may be negative.

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

Return the (signed) number of days between the specified lhs and rhs dates. Note that if lhs < rhs the result will be negative.

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

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

Return a Datetime object having a value that is the difference between the specified lhs (Datetime) and the specified rhs (DatetimeInterval). 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.

Return a Datetime object having a value that is the difference between 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.

Return a DatetimeInterval object whose value is the difference between the specified lhs and rhs time intervals. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32‐bit integer).

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 elements between specified lhs and rhs. The behavior is undefined unless lhs and rhs refer to codes associated with the same holiday in the same calendar.

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

Created with MrDocs