[#BloombergLP-bblb-ScheduleGenerationUtil-generateFromDayOfWeekInMonth-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bblb.adoc[bblb]::xref:BloombergLP/bblb/ScheduleGenerationUtil.adoc[ScheduleGenerationUtil]::generateFromDayOfWeekInMonth
:relfileprefix: ../../../
:mrdocs:

Load day&hyphen;of&hyphen;week&hyphen;in&hyphen;month schedule dates into the specified `schedule`&period;

== Synopsis

Declared in `&lt;bblb&lowbar;schedulegenerationutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
generateFromDayOfWeekInMonth(
    xref:bsl/vector-00d.adoc[bsl::vector&lt;bdlt::Date&gt;]* schedule,
    xref:BloombergLP/bdlt/Date.adoc[bdlt::Date] const& earliest,
    xref:BloombergLP/bdlt/Date.adoc[bdlt::Date] const& latest,
    int exampleYear,
    int exampleMonth,
    int intervalInMonths,
    xref:BloombergLP/bdlt/DayOfWeek/Enum.adoc[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&hyphen;interval `&lsqb;earliest, latest&rsqb;`&period; The behavior is undefined unless `earliest &lt;&equals; latest`, `1 &lt;&equals; exampleYear &lt;&equals; 9999`, `1 &lt;&equals; exampleMonth &lt;&equals; 12`, `1 &lt;&equals; intervalInMonths`, and `1 &lt;&equals; occurrenceWeek &lt;&equals; 4`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *schedule*
| receives the generated date sequence
| *earliest*
| inclusive start of the date window
| *latest*
| inclusive end of the date window
| *exampleYear*
| reference year for the interval lattice
| *exampleMonth*
| reference month for the interval lattice
| *intervalInMonths*
| spacing between schedule months
| *dayOfWeek*
| weekday required in `occurrenceWeek`
| *occurrenceWeek*
| week&hyphen;of&hyphen;month index in the range `&lsqb;1 &period;&period; 4&rsqb;`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
