[#BloombergLP-bdlt-PackedCalendar-addHolidayCodeIfInRange] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/PackedCalendar.adoc[PackedCalendar]::addHolidayCodeIfInRange :relfileprefix: ../../../ :mrdocs: Mark the specified `date` as a holiday (i.e., a non‐business day) in this calendar and add the specified `holidayCode` (if not already present) to the set of codes associated with `date`, if `date` is within the valid range of this calendar. Return 0 if `date` is in range, and a non‐zero value otherwise. If `holidayCode` is already a code for `date`, or if `date` is not in the valid range, this method has no effect. See {Iterator Invalidation} for information regarding which iterators are affected by the use of this method. 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. == Synopsis Declared in `<bdlt_packedcalendar.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int addHolidayCodeIfInRange( xref:BloombergLP/bdlt/Date.adoc[Date] const& date, int holidayCode); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#