[#BloombergLP-bdlt-operator_minus-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::operator‐ :relfileprefix: ../../ :mrdocs: 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()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] xref:BloombergLP/bdlt/operator_minus-01.adoc[operator‐](xref:BloombergLP/bdlt/DatetimeInterval.adoc[DatetimeInterval] const& value); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-01.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/Date.adoc[bdlt::Date] xref:BloombergLP/bdlt/operator_minus-09c.adoc[operator‐]( xref:BloombergLP/bdlt/Date.adoc[Date] const& date, int numDays); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-09c.adoc[_» more..._]# Return the (signed) number of days between the specified `lhs` and `rhs` dates. Note that if `lhs < rhs` the result will be negative. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int xref:BloombergLP/bdlt/operator_minus-00f.adoc[operator‐]( xref:BloombergLP/bdlt/Date.adoc[Date] const& lhs, xref:BloombergLP/bdlt/Date.adoc[Date] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-00f.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] xref:BloombergLP/bdlt/operator_minus-0c.adoc[operator‐]( xref:BloombergLP/bdlt/Datetime.adoc[Datetime] const& lhs, xref:BloombergLP/bdlt/Datetime.adoc[Datetime] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-0c.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/Datetime.adoc[bdlt::Datetime] xref:BloombergLP/bdlt/operator_minus-07.adoc[operator‐]( xref:BloombergLP/bdlt/Datetime.adoc[Datetime] const& lhs, xref:BloombergLP/bdlt/DatetimeInterval.adoc[DatetimeInterval] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-07.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/Datetime.adoc[bdlt::Datetime] xref:BloombergLP/bdlt/operator_minus-06.adoc[operator‐]( xref:BloombergLP/bdlt/Datetime.adoc[Datetime] const& lhs, xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-06.adoc[_» more..._]# 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). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] xref:BloombergLP/bdlt/operator_minus-0f.adoc[operator‐]( xref:BloombergLP/bdlt/DatetimeInterval.adoc[DatetimeInterval] const& lhs, xref:BloombergLP/bdlt/DatetimeInterval.adoc[DatetimeInterval] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-0f.adoc[_» 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`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/DayOfWeekSet.adoc[bdlt::DayOfWeekSet] xref:BloombergLP/bdlt/operator_minus-0b.adoc[operator‐]( xref:BloombergLP/bdlt/DayOfWeekSet.adoc[DayOfWeekSet] const& lhs, xref:BloombergLP/bdlt/DayOfWeekSet.adoc[DayOfWeekSet] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-0b.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::ptrdiff_t xref:BloombergLP/bdlt/operator_minus-094.adoc[operator‐]( xref:BloombergLP/bdlt/PackedCalendar_HolidayCodeConstIterator.adoc[PackedCalendar_HolidayCodeConstIterator] const& lhs, xref:BloombergLP/bdlt/PackedCalendar_HolidayCodeConstIterator.adoc[PackedCalendar_HolidayCodeConstIterator] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-094.adoc[_» more..._]# Return a `Time` value that is the difference between the specified `lhs` time and the specified `rhs` datetime interval. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/Time.adoc[bdlt::Time] xref:BloombergLP/bdlt/operator_minus-03.adoc[operator‐]( xref:BloombergLP/bdlt/Time.adoc[Time] const& lhs, xref:BloombergLP/bdlt/DatetimeInterval.adoc[DatetimeInterval] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-03.adoc[_» more..._]# Return a `DatetimeInterval` object initialized with the difference between the specified `lhs` and `rhs` time values. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] xref:BloombergLP/bdlt/operator_minus-003.adoc[operator‐]( xref:BloombergLP/bdlt/Time.adoc[Time] const& lhs, xref:BloombergLP/bdlt/Time.adoc[Time] const& rhs); ---- [.small]#xref:BloombergLP/bdlt/operator_minus-003.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#