BloombergLP::bdlt::PackedCalendar_DateRef

Reference to a Date for holiday and business-day iterators.

Synopsis

Declared in <bdlt_packedcalendar.h>

class PackedCalendar_DateRef
    : public Date

Description

This private class is used by the arrow operator of the holiday iterator and business day iterator classes. The objects instantiated from this class serve as references to Date objects.

Base Classes

NameDescription
DateValue-semantic type representing a date in the Unix (POSIX) calendar.

Member Functions

NameDescription
PackedCalendar_DateRef [constructor]Constructors
~PackedCalendar_DateRef [destructor]Destroy this object.
operator= Assign to this object the value of the specified rhs date, and return a reference providing modifiable access to this object.
addDaysIfValid Add numDays if the result is a supported date; otherwise do nothing.
bdexStreamIn Assign to this object the value read from the specified BDEX stream.
bdexStreamOut Write this date to the specified output stream.
day Return the day of the month in the range [1 .. 31] of this date.
dayOfWeek Return the day of the week in the range [DayOfWeek::e_SUN .. DayOfWeek::e_SAT] of this date.
dayOfYear Return the day of the year in the range [1 .. 366] of this date.
getYearDay Load, into the specified year and dayOfYear, the respective year and dayOfYear attribute values of this date.
getYearMonthDay Load, into the specified year, month, and day, the respective year, month, and day attribute values of this date.
month Return the month of the year in the range [1 .. 12] of this date.
monthOfYear Return the month of the year in the range [MonthOfYear::e_JAN .. MonthOfYear::e_DEC] of this date.
operator& Return a proxy object to this object's referenced date.
operator++ Advance this date by one day.
operator+= Advance this date by the specified (signed) number of days.
operator-- Move this date earlier by one day.
operator-= Move this date earlier by the specified (signed) number of days.
print Write this date to the specified output stream in a human-readable form.
setYearDay Set this date to the specified year and dayOfYear.
setYearDayIfValid Set this date from year and dayOfYear if they form a valid value.
setYearMonthDay Set this date to the specified year, month, and day.
setYearMonthDayIfValid Set this date from Y/M/D if they form a valid value; otherwise do nothing.
streamOut Write this date to the specified stream in a single-line format.
validateAndSetYearDay Set this date from year and dayOfYear if they form a valid value.
validateAndSetYearMonthDay Set this date from Y/M/D if they form a valid value; otherwise do nothing.
year Return the year in the range [1 .. 9999] of this date.

Static Member Functions

NameDescription
isValid isValid overloads
isValidYearDay Return true if year and dayOfYear form a valid Date value.
isValidYearMonthDay Return true if year, month, and day form a valid Date value.
maxSupportedBdexVersion maxSupportedBdexVersion overloads
maxSupportedVersion Return the most current BDEX streaming version number supported by this class.

Non-Member Functions

NameDescription
operator!=Return true if the two dates do not have the same value.
operator+Return the date that is later by numDays from the specified date.
operator++Advance date by one day and return its previous value.
operator-Return the signed number of days between two dates.
operator-Return the date that is earlier by numDays from the specified date.
operator--Move date earlier by one day and return its previous value.
operator<Return true if the specified lhs date is earlier than the specified rhs date, and false otherwise.
operator<=Return true if the specified lhs date is earlier than or the same as the specified rhs date, and false otherwise.
operator==Return true if the two dates have the same value.
operator>Return true if the specified lhs date is later than the specified rhs date, and false otherwise.
operator>=Return true if the specified lhs date is later than or the same as the specified rhs date, and false otherwise.