[#BloombergLP-bdlt-PosixDateImpUtil-lastDayOfMonth]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/PosixDateImpUtil.adoc[PosixDateImpUtil]::lastDayOfMonth
:relfileprefix: ../../../
:mrdocs:

Return the last day of month for the given year and month&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
lastDayOfMonth(
    int year,
    int month);
----

== Description

Return the last day of the specified `month` in the specified `year`&period; The behavior is undefined unless `1 &lt;&equals; year &lt;&equals; 9999` and `1 &lt;&equals; month &lt;&equals; 12`&period; Note that the value returned will be in the range `&lsqb; 28 &period;&period; 31 &rsqb;`&period;

== Return Value

last day of the month in `&lsqb;28 &period;&period; 31&rsqb;`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *year*
| calendar year in `&lsqb;1 &period;&period; 9999&rsqb;`
| *month*
| month of year in `&lsqb;1 &period;&period; 12&rsqb;`
|===


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