Return the previous occurrence of dayOfWeek before date.

Synopsis

Declared in <bdlt_dateutil.h>

static
Date
previousDayOfWeek(
    DayOfWeek::Enum dayOfWeek,
    Date const& date);

Description

Return the last date before the specified date that falls on the specified dayOfWeek. The behavior is undefined unless the resulting date is no earlier than 1/1/1.

Return Value

previous matching date

Parameters

Name

Description

dayOfWeek

desired day of week

date

exclusive upper bound date

Created with MrDocs