[#BloombergLP-bdlt-CalendarUtil-shiftIfValid-0df] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/CalendarUtil.adoc[CalendarUtil]::shiftIfValid :relfileprefix: ../../../ :mrdocs: `shiftIfValid` overloads == Synopses Declared in `<bdlt_calendarutil.h>` Shift `original` using the specified `convention` if valid. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/CalendarUtil/shiftIfValid-09.adoc[shiftIfValid]( xref:BloombergLP/bdlt/Date.adoc[bdlt::Date]* result, xref:BloombergLP/bdlt/Date.adoc[bdlt::Date] const& original, xref:BloombergLP/bdlt/Calendar.adoc[bdlt::Calendar] const& calendar, xref:BloombergLP/bdlt/CalendarUtil/ShiftConvention.adoc[ShiftConvention] convention); ---- [.small]#xref:BloombergLP/bdlt/CalendarUtil/shiftIfValid-09.adoc[_» more..._]# Shift `original` with special‐day handling if valid. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlt/CalendarUtil/shiftIfValid-0d7.adoc[shiftIfValid]( xref:BloombergLP/bdlt/Date.adoc[bdlt::Date]* result, xref:BloombergLP/bdlt/Date.adoc[bdlt::Date] const& original, xref:BloombergLP/bdlt/Calendar.adoc[bdlt::Calendar] const& calendar, xref:BloombergLP/bdlt/CalendarUtil/ShiftConvention.adoc[ShiftConvention] convention, xref:BloombergLP/bdlt/DayOfWeek/Enum.adoc[bdlt::DayOfWeek::Enum] specialDay, bool extendSpecialDay, xref:BloombergLP/bdlt/CalendarUtil/ShiftConvention.adoc[ShiftConvention] specialConvention); ---- [.small]#xref:BloombergLP/bdlt/CalendarUtil/shiftIfValid-0d7.adoc[_» more..._]# == Return Value 0 on success, non‐zero on failure == Parameters [cols="1,4"] |=== | Name| Description | *result* | destination for the shifted date | *original* | starting date | *calendar* | calendar used for business‐day determination | *convention* | date‐shifting convention to apply | *specialDay* | day of week that triggers special handling | *extendSpecialDay* | whether non‐business days preceding `specialDay` also use `specialConvention` | *specialConvention* | convention used for special‐day cases |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#