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);

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);

Return Value

0 on success, non‐zero on failure

Parameters

Name

Description

result

destination for the shifted date

original

starting date

calendar

calendar used for business‐day determination

convention

date‐shifting convention to apply

specialDay

day of week that triggers special handling

extendSpecialDay

whether non‐business days preceding specialDay also use specialConvention

specialConvention

convention used for special‐day cases

Created with MrDocs