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>

int
addHolidayCodeIfInRange(
    Date const& date,
    int holidayCode);

Created with MrDocs