Class or struct representing a positive or negative delta of a number of days or weeks. More...
Public Member Functions | |
| int_delta | days () const |
| Get the number of days represented by a DayDelta. More... | |
| int_delta | weeks () const |
| Get the number of weeks represented by a DayDelta. More... | |
| double | weeks_decimal () const |
| Get the number of weeks represented by a DayDelta, with a fractional part if necessary. More... | |
| TimeDelta | to_TimeDelta () const |
| Convert a DayDelta into an equivalent TimeDelta. More... | |
| bool | is_negative () const |
| Determine whether a DayDelta is negative. More... | |
| void | negate () |
| Negate a DayDelta, making it negative if it was positive or positive if it was negative. More... | |
| DayDelta | operator- () const |
| Return the negated version of this DayDelta. More... | |
| DayDelta & | operator++ () |
| Add one day to the DayDelta. More... | |
| DayDelta | operator++ (int) |
| Add one day to the DayDelta. More... | |
| DayDelta & | operator-- () |
| Subtract one day from the DayDelta. More... | |
| DayDelta | operator-- (int) |
| Subtract one day from the DayDelta. More... | |
| DayDelta & | operator*= (const long &scale_factor) |
| Scale a DayDelta by multiplying it by a scale factor. More... | |
| DayDelta & | operator/= (const long &scale_factor) |
| Scale a DayDelta by dividing it by a scale factor. More... | |
| DayDelta & | operator+= (const DayDelta &other) |
| Add another DayDelta to a DayDelta. More... | |
| DayDelta & | operator-= (const DayDelta &other) |
| Subtract another DayDelta from a DayDelta. More... | |
Static Public Member Functions | |
| static DayDelta | from_days (int_delta days) |
| Create a new DayDelta based on a positive or negative number of days. More... | |
| static DayDelta | from_weeks (int_delta weeks) |
| Create a new DayDelta based on a positive or negative number of weeks. More... | |
| static DayDelta | zero () |
| Create a new DayDelta initialized to zero days. More... | |
| static short | compare (const DayDelta &lhs, const DayDelta &rhs) |
| Compare two DayDelta instances. More... | |
| static short | compare (const DayDelta &lhs, const TimeDelta &rhs) |
| Compare a DayDelta to a TimeDelta. More... | |
| static short | compare (const TimeDelta &lhs, const DayDelta &rhs) |
Public Attributes | |
| struct PresentDayDeltaData | data_ |
Friends | |
| const DayDelta | operator* (const DayDelta &delta, const long &scale_factor) |
| const DayDelta | operator/ (const DayDelta &delta, const long &scale_factor) |
| const DayDelta | operator+ (const DayDelta &lhs, const DayDelta &rhs) |
| const DayDelta | operator- (const DayDelta &lhs, const DayDelta &rhs) |
| bool | operator== (const DayDelta &lhs, const DayDelta &rhs) |
| Determine whether two DayDelta instances are equal (lhs == rhs). More... | |
| bool | operator== (const DayDelta &lhs, const TimeDelta &rhs) |
| Determine whether a DayDelta equals a TimeDelta (lhs == rhs). More... | |
| bool | operator!= (const DayDelta &lhs, const DayDelta &rhs) |
| bool | operator!= (const DayDelta &lhs, const TimeDelta &rhs) |
| bool | operator< (const DayDelta &lhs, const DayDelta &rhs) |
| Determine whether a DayDelta is less than another DayDelta (lhs < rhs). More... | |
| bool | operator< (const DayDelta &lhs, const TimeDelta &rhs) |
| Determine whether a DayDelta is less than a TimeDelta (lhs < rhs). More... | |
| bool | operator<= (const DayDelta &lhs, const DayDelta &rhs) |
| Determine whether a DayDelta is less than or equal to another DayDelta (lhs <= rhs). More... | |
| bool | operator<= (const DayDelta &lhs, const TimeDelta &rhs) |
| Determine whether a DayDelta is less than or equal to a TimeDelta (lhs <= rhs). More... | |
| bool | operator> (const DayDelta &lhs, const DayDelta &rhs) |
| Determine whether a DayDelta is greater than another DayDelta (lhs > rhs). More... | |
| bool | operator> (const DayDelta &lhs, const TimeDelta &rhs) |
| Determine whether a DayDelta is greater than a TimeDelta (lhs > rhs). More... | |
| bool | operator>= (const DayDelta &lhs, const DayDelta &rhs) |
| Determine whether a DayDelta is greater than or equal to another DayDelta (lhs >= rhs). More... | |
| bool | operator>= (const DayDelta &lhs, const TimeDelta &rhs) |
| Determine whether a DayDelta is greater than or equal to a TimeDelta (lhs >= rhs). More... | |
Class or struct representing a positive or negative delta of a number of days or weeks.
Create a new DayDelta based on a positive or negative number of days.
Create a new DayDelta based on a positive or negative number of weeks.
| int_delta DayDelta::weeks | ( | ) | const |
| double DayDelta::weeks_decimal | ( | ) | const |
Get the number of weeks represented by a DayDelta, with a fractional part if necessary.
| bool DayDelta::is_negative | ( | ) | const |
Determine whether a DayDelta is negative.
| void DayDelta::negate | ( | ) |
Negate a DayDelta, making it negative if it was positive or positive if it was negative.
| DayDelta DayDelta::operator- | ( | ) | const |
Return the negated version of this DayDelta.
| DayDelta& DayDelta::operator*= | ( | const long & | scale_factor | ) |
Scale a DayDelta by multiplying it by a scale factor.
| DayDelta& DayDelta::operator/= | ( | const long & | scale_factor | ) |
Scale a DayDelta by dividing it by a scale factor.
Compare two DayDelta instances.
Determine whether two DayDelta instances are equal (lhs == rhs).
| struct PresentDayDeltaData DayDelta::data_ |