[#BloombergLP-bdlt-Calendar-setValidRange]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Calendar.adoc[Calendar]::setValidRange
:relfileprefix: ../../../
:mrdocs:

Set the valid range of this calendar to `&lsqb;firstDate &period;&period; lastDate&rsqb;`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setValidRange(
    xref:BloombergLP/bdlt/Date.adoc[Date] const& firstDate,
    xref:BloombergLP/bdlt/Date.adoc[Date] const& lastDate);
----

== Description

Set the range of this calendar using the specified `firstDate` and `lastDate` as, respectively, the first date and the last date of the calendar&period; Any holiday that is outside the new range and its holiday codes are removed&period; See &lcub;Iterator Invalidation&rcub; for information regarding which iterators are affected by the use of this method&period; The behavior is undefined unless `firstDate &lt;&equals; lastDate`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *firstDate*
| earliest date in the new valid range
| *lastDate*
| latest date in the new valid range
|===


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