BloombergLP::bblb::ScheduleGenerationUtil::generateFromDayOfWeekInMonth

Load day-of-week-in-month schedule dates into the specified schedule.

Synopsis

Declared in <bblb_schedulegenerationutil.h>

static
void
generateFromDayOfWeekInMonth(
    bsl::vector<bdlt::Date>* schedule,
    bdlt::Date const& earliest,
    bdlt::Date const& latest,
    int exampleYear,
    int exampleMonth,
    int intervalInMonths,
    bdlt::DayOfWeek::Enum dayOfWeek,
    int occurrenceWeek);

Description

Load, into the specified schedule, the chronologically increasing sequence of unique dates that are on the specified dayOfWeek of the specified occurrenceWeek of the month, integral multiples of the specified intervalInMonths away from the specified exampleYear and exampleMonth, and within the specified closed-interval [earliest, latest]. The behavior is undefined unless earliest <= latest, 1 <= exampleYear <= 9999, 1 <= exampleMonth <= 12, 1 <= intervalInMonths, and 1 <= occurrenceWeek <= 4.

Parameters

NameDescription
schedulereceives the generated date sequence
earliestinclusive start of the date window
latestinclusive end of the date window
exampleYearreference year for the interval lattice
exampleMonthreference month for the interval lattice
intervalInMonthsspacing between schedule months
dayOfWeekweekday required in occurrenceWeek
occurrenceWeekweek-of-month index in the range [1 .. 4]