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

Add days if the result remains a valid datetime&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
addDaysIfValid(int days);
----

== Description

Add the specified number of `days` to the value of this object, if the resulting value is in the valid range for a `Datetime` object&period; Return 0 on success, and a non&hyphen;zero value (with no effect) otherwise&period; Note that this method has no effect on the &quot;time&quot; part of this object&period; Also note that `days` may be positive, 0, or negative&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *days*
| number of days to add (may be negative)
|===


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