BloombergLP::bdlt::DateUtil::previousDayOfWeekInclusive

Return the previous occurrence of dayOfWeek on or before date.

Synopsis

Declared in <bdlt_dateutil.h>

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

Description

Return the last date on or 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 on or before date

Parameters

NameDescription
dayOfWeekdesired day of week
dateinclusive upper bound date