[#BloombergLP-bdlt-DateUtil-lastDayOfWeekInMonth] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/DateUtil.adoc[DateUtil]::lastDayOfWeekInMonth :relfileprefix: ../../../ :mrdocs: Return the latest `dayOfWeek` in the given month and year. == Synopsis Declared in `<bdlt_dateutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdlt/Date.adoc[Date] lastDayOfWeekInMonth( int year, int month, xref:BloombergLP/bdlt/DayOfWeek/Enum.adoc[DayOfWeek::Enum] dayOfWeek); ---- == Description Return the latest date in the specified `month` of the specified `year` that falls on the specified `dayOfWeek`. The behavior is undefined unless `1 <= year <= 9999` and `1 <= month <= 12`. == Return Value latest matching date in the month == Parameters [cols="1,4"] |=== | Name| Description | *year* | calendar year | *month* | month of year in `[1 .. 12]` | *dayOfWeek* | desired day of week |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#