[#BloombergLP-bdlt-PackedCalendar_DateRef]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::PackedCalendar&lowbar;DateRef
:relfileprefix: ../../
:mrdocs:

Reference to a `Date` for holiday and business&hyphen;day iterators&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;packedcalendar&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class PackedCalendar&lowbar;DateRef
    : public xref:BloombergLP/bdlt/Date.adoc[Date]
----

== Description

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

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlt/Date.adoc[Date]`
| Value&hyphen;semantic type representing a date in the Unix (POSIX) calendar&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/PackedCalendar_DateRef/2constructor-0b8.adoc[`PackedCalendar&lowbar;DateRef`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlt/PackedCalendar_DateRef/2destructor.adoc[`&#126;PackedCalendar&lowbar;DateRef`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdlt/Date/operator_assign.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs` date, and return a reference providing modifiable access to this object&period;
| xref:BloombergLP/bdlt/Date/addDaysIfValid.adoc[`addDaysIfValid`] 
| Add `numDays` if the result is a supported date&semi; otherwise do nothing&period;
| xref:BloombergLP/bdlt/Date/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified BDEX stream&period;
| xref:BloombergLP/bdlt/Date/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write this date to the specified output stream&period;
| xref:BloombergLP/bdlt/Date/day.adoc[`day`] 
| Return the day of the month in the range `&lsqb;1 &period;&period; 31&rsqb;` of this date&period;
| xref:BloombergLP/bdlt/Date/dayOfWeek.adoc[`dayOfWeek`] 
| Return the day of the week in the range `&lsqb;DayOfWeek&colon;&colon;e&lowbar;SUN &period;&period; DayOfWeek&colon;&colon;e&lowbar;SAT&rsqb;` of this date&period;
| xref:BloombergLP/bdlt/Date/dayOfYear.adoc[`dayOfYear`] 
| Return the day of the year in the range `&lsqb;1 &period;&period; 366&rsqb;` of this date&period;
| xref:BloombergLP/bdlt/Date/getYearDay.adoc[`getYearDay`] 
| Load, into the specified `year` and `dayOfYear`, the respective `year` and `dayOfYear` attribute values of this date&period;
| xref:BloombergLP/bdlt/Date/getYearMonthDay.adoc[`getYearMonthDay`] 
| Load, into the specified `year`, `month`, and `day`, the respective `year`, `month`, and `day` attribute values of this date&period;
| xref:BloombergLP/bdlt/Date/month.adoc[`month`] 
| Return the month of the year in the range `&lsqb;1 &period;&period; 12&rsqb;` of this date&period;
| xref:BloombergLP/bdlt/Date/monthOfYear.adoc[`monthOfYear`] 
| Return the month of the year in the range `&lsqb;MonthOfYear&colon;&colon;e&lowbar;JAN &period;&period; MonthOfYear&colon;&colon;e&lowbar;DEC&rsqb;` of this date&period;
| xref:BloombergLP/bdlt/PackedCalendar_DateRef/operator_bitand.adoc[`operator&amp;`] 
| Return a proxy object to this object&apos;s referenced date&period;
| xref:BloombergLP/bdlt/Date/operator_inc.adoc[`operator&plus;&plus;`] 
| Advance this date by one day&period;
| xref:BloombergLP/bdlt/Date/operator_plus_eq.adoc[`operator&plus;&equals;`] 
| Advance this date by the specified (signed) number of days&period;
| xref:BloombergLP/bdlt/Date/operator_dec.adoc[`operator&hyphen;&hyphen;`] 
| Move this date earlier by one day&period;
| xref:BloombergLP/bdlt/Date/operator_minus_eq.adoc[`operator&hyphen;&equals;`] 
| Move this date earlier by the specified (signed) number of days&period;
| xref:BloombergLP/bdlt/Date/print.adoc[`print`] 
| Write this date to the specified output stream in a human&hyphen;readable form&period;
| xref:BloombergLP/bdlt/Date/setYearDay.adoc[`setYearDay`] 
| Set this date to the specified `year` and `dayOfYear`&period;
| xref:BloombergLP/bdlt/Date/setYearDayIfValid.adoc[`setYearDayIfValid`] 
| Set this date from `year` and `dayOfYear` if they form a valid value&period;
| xref:BloombergLP/bdlt/Date/setYearMonthDay.adoc[`setYearMonthDay`] 
| Set this date to the specified `year`, `month`, and `day`&period;
| xref:BloombergLP/bdlt/Date/setYearMonthDayIfValid.adoc[`setYearMonthDayIfValid`] 
| Set this date from Y&sol;M&sol;D if they form a valid value&semi; otherwise do nothing&period;
| xref:BloombergLP/bdlt/Date/streamOut.adoc[`streamOut`] 
| Write this date to the specified stream in a single&hyphen;line format&period;
| xref:BloombergLP/bdlt/Date/validateAndSetYearDay.adoc[`validateAndSetYearDay`] 
| Set this date from `year` and `dayOfYear` if they form a valid value&period;
| xref:BloombergLP/bdlt/Date/validateAndSetYearMonthDay.adoc[`validateAndSetYearMonthDay`] 
| Set this date from Y&sol;M&sol;D if they form a valid value&semi; otherwise do nothing&period;
| xref:BloombergLP/bdlt/Date/year.adoc[`year`] 
| Return the year in the range `&lsqb;1 &period;&period; 9999&rsqb;` of this date&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/Date/isValid-09.adoc[`isValid`] 
| `isValid` overloads
| xref:BloombergLP/bdlt/Date/isValidYearDay.adoc[`isValidYearDay`] 
| Return `true` if `year` and `dayOfYear` form a valid `Date` value&period;
| xref:BloombergLP/bdlt/Date/isValidYearMonthDay.adoc[`isValidYearMonthDay`] 
| Return `true` if `year`, `month`, and `day` form a valid `Date` value&period;
| xref:BloombergLP/bdlt/Date/maxSupportedBdexVersion-06.adoc[`maxSupportedBdexVersion`] 
| `maxSupportedBdexVersion` overloads
| xref:BloombergLP/bdlt/Date/maxSupportedVersion.adoc[`maxSupportedVersion`] 
| Return the most current BDEX streaming version number supported by this class&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/operator_not_eq-0cd.adoc[`operator!&equals;`]
| Return `true` if the two dates do not have the same value&period;
| xref:BloombergLP/bdlt/operator_plus-04.adoc[`operator&plus;`]
| Return the date that is later by `numDays` from the specified `date`&period;
| xref:BloombergLP/bdlt/operator_inc-0f.adoc[`operator&plus;&plus;`]
| Advance `date` by one day and return its previous value&period;
| xref:BloombergLP/bdlt/operator_minus-00f.adoc[`operator&hyphen;`]
| Return the signed number of days between two dates&period;
| xref:BloombergLP/bdlt/operator_minus-09c.adoc[`operator&hyphen;`]
| Return the date that is earlier by `numDays` from the specified `date`&period;
| xref:BloombergLP/bdlt/operator_dec-01.adoc[`operator&hyphen;&hyphen;`]
| Move `date` earlier by one day and return its previous value&period;
| xref:BloombergLP/bdlt/operator_lt-01.adoc[`operator&lt;`]
| Return `true` if the specified `lhs` date is earlier than the specified `rhs` date, and `false` otherwise&period;
| xref:BloombergLP/bdlt/operator_le-04.adoc[`operator&lt;&equals;`]
| Return `true` if the specified `lhs` date is earlier than or the same as the specified `rhs` date, and `false` otherwise&period;
| xref:BloombergLP/bdlt/operator_eq-057.adoc[`operator&equals;&equals;`]
| Return `true` if the two dates have the same value&period;
| xref:BloombergLP/bdlt/operator_gt-0c.adoc[`operator&gt;`]
| Return `true` if the specified `lhs` date is later than the specified `rhs` date, and `false` otherwise&period;
| xref:BloombergLP/bdlt/operator_ge-079.adoc[`operator&gt;&equals;`]
| Return `true` if the specified `lhs` date is later than or the same as the specified `rhs` date, and `false` otherwise&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
