[#BloombergLP-bdlt-Calendar-holidayCode]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Calendar.adoc[Calendar]::holidayCode
:relfileprefix: ../../../
:mrdocs:

Return, for the holiday at the specified `date` in this calendar, the holiday code at the specified `index`&period; For all `index` values from 0 to `numHolidayCodes(date) &hyphen; 1` (inclusive), a unique holiday code is returned&period; The mapping of `index` to holiday code is invalidated when the set of holidays or holiday codes is modified by an invocation of `addHoliday`, `addHolidayCode`, `addHolidayCodeIfInRange`, `addHolidayIfInRange`, `intersectBusinessDays`, `intersectNonBusinessDays`, `removeAll`, `removeHoliday`, `removeHolidayCode`, `setValidRange`, `unionBusinessDays`, or `unionNonBusinessDays`&period; The behavior is undefined unless `date` is a holiday in this calendar and `0 &lt;&equals; index &lt; numHolidayCodes(date)`&period; Note that this method facilitates testing and generally should not be used by clients&semi; in particular, using this method to iterate over the holiday codes for `date` is less efficient than using a `HolidayCodeConstIterator`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
holidayCode(
    xref:BloombergLP/bdlt/Date.adoc[Date] const& date,
    int index) const;
----


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