[#BloombergLP-bdlt-DateUtil-addMonthsEom]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/DateUtil.adoc[DateUtil]::addMonthsEom
:relfileprefix: ../../../
:mrdocs:

Return the date that is the specified `numMonths` from the specified `original` date, adjusted as necessary according to the following (end&hyphen;of&hyphen;month) rules&colon; (1) if `original` is the last day of a month, adjust the result to be the last day of the month, and (2) if the day of the month in `original` does not exist in the month of the result (e&period;g&period;, February 30), move the resulting date to the last day of the month&period; The behavior is undefined unless the operation results in a valid `Date` value&period; Note that `numMonths` may be negative&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;dateutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlt/Date.adoc[Date]
addMonthsEom(
    xref:BloombergLP/bdlt/Date.adoc[Date] const& original,
    int numMonths);
----


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