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

Mark `date` as a holiday and add `holidayCode` for that date&period;

== Synopsis

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

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

== Description

Mark the specified `date` as a holiday (i&period;e&period;, a non&hyphen;business day) in this calendar and add the specified `holidayCode` (if not already present) to the ordered set of codes associated with `date`&period; Extend the valid range of this calendar if necessary&period; If `holidayCode` is already a code for `date`, this method has no effect&period; See &lcub;Iterator Invalidation&rcub; for information regarding which iterators are affected by the use of this method&period; Note that this method may be called repeatedly with the same value for `date` to build up a set of holiday codes for that date&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *date*
| date to mark as a holiday
| *holidayCode*
| code to associate with `date`
|===


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