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

This `struct` provides a namespace for utility functions that operate on dates in the context of supplied calendars&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct CalendarUtil;
----

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/CalendarUtil/ShiftConvention.adoc[`ShiftConvention`] 
| Enumeration used to delineate various date&hyphen;shifting conventions&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/CalendarUtil/addBusinessDaysIfValid.adoc[`addBusinessDaysIfValid`] 
| Add or subtract business days from `original` if valid&period;
| xref:BloombergLP/bdlt/CalendarUtil/nthBusinessDayOfMonthOrMaxIfValid.adoc[`nthBusinessDayOfMonthOrMaxIfValid`] 
| Load the `n`th business day of a month, or the furthest available&period;
| xref:BloombergLP/bdlt/CalendarUtil/shiftFollowingIfValid.adoc[`shiftFollowingIfValid`] 
| Shift `original` to the next valid business day (following)&period;
| xref:BloombergLP/bdlt/CalendarUtil/shiftIfValid-0df.adoc[`shiftIfValid`] 
| `shiftIfValid` overloads
| xref:BloombergLP/bdlt/CalendarUtil/shiftModifiedFollowingIfValid.adoc[`shiftModifiedFollowingIfValid`] 
| Shift using modified&hyphen;following convention if valid&period;
| xref:BloombergLP/bdlt/CalendarUtil/shiftModifiedPrecedingIfValid.adoc[`shiftModifiedPrecedingIfValid`] 
| Shift `original` to the next valid business day (modified preceding)&period;
| xref:BloombergLP/bdlt/CalendarUtil/shiftPrecedingIfValid.adoc[`shiftPrecedingIfValid`] 
| Shift `original` to the next valid business day (preceding)&period;
| xref:BloombergLP/bdlt/CalendarUtil/subtractBusinessDaysIfValid.adoc[`subtractBusinessDaysIfValid`] 
| Subtract business days from `original` if valid&period;
|===



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