BloombergLP::bdlt::CalendarUtil::shiftIfValid

shiftIfValid overloads

Synopses

Declared in <bdlt_calendarutil.h>

Shift original using the specified convention if valid.

static
int
shiftIfValid(
    bdlt::Date* result,
    bdlt::Date const& original,
    bdlt::Calendar const& calendar,
    ShiftConvention convention);
» more...

Shift original with special-day handling if valid.

static
int
shiftIfValid(
    bdlt::Date* result,
    bdlt::Date const& original,
    bdlt::Calendar const& calendar,
    ShiftConvention convention,
    bdlt::DayOfWeek::Enum specialDay,
    bool extendSpecialDay,
    ShiftConvention specialConvention);
» more...

Return Value

0 on success, non-zero on failure

Parameters

NameDescription
resultdestination for the shifted date
originalstarting date
calendarcalendar used for business-day determination
conventiondate-shifting convention to apply
specialDayday of week that triggers special handling
extendSpecialDaywhether non-business days preceding specialDay also use specialConvention
specialConventionconvention used for special-day cases