[#BloombergLP-bdlt-DatetimeInterval-addIntervalIfValid] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/DatetimeInterval.adoc[DatetimeInterval]::addIntervalIfValid :relfileprefix: ../../../ :mrdocs: Add to this time interval the specified number of `days`, and the optionally specified number of `hours`, `minutes`, `seconds`, `milliseconds`, and `microseconds`. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an `int`) and a non‐zero value (with no effect) otherwise. Note that the arguments may be supplied using a mixture of positive, negative, and 0 values. == Synopsis Declared in `<bdlt_datetimeinterval.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int addIntervalIfValid( int days, xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] hours = 0, xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] minutes = 0, xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] seconds = 0, xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] milliseconds = 0, xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] microseconds = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#