[#BloombergLP-bdlt-Datetime-isValid]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Datetime.adoc[Datetime]::isValid
:relfileprefix: ../../../
:mrdocs:

Return `true` if the specified `year`, `month`, and `day` attribute values, and the optionally specified `hour`, `minute`, `second`, `millisecond`, and `microsecond` attribute values, represent a valid `Datetime` value, and `false` otherwise&period; Unspecified trailing optional parameters default to 0&period; `year`, `month`, `day`, `hour`, `minute`, `second`, `millisecond`, and `microsecond` attribute values represent a valid `Datetime` value if `true &equals;&equals; Date&colon;&colon;isValidYearMonthDay(year, month, day)`, `0 &lt;&equals; hour &lt; 24`, `0 &lt;&equals; minute &lt; 60`, `0 &lt;&equals; second &lt; 60`, `0 &lt;&equals; millisecond &lt; 1000`, and `0 &lt;&equals; microsecond &lt; 1000`&period; Additionally, a valid `year`, `month`, `day` with the time portion equal to 24&colon;00&colon;00&period;000000 also represents a valid `Datetime` value&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
isValid(
    int year,
    int month,
    int day,
    int hour = 0,
    int minute = 0,
    int second = 0,
    int millisecond = 0,
    int microsecond = 0);
----


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