[#BloombergLP-bdlt-Date-validateAndSetYearMonthDay] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Date.adoc[Date]::validateAndSetYearMonthDay :relfileprefix: ../../../ :mrdocs: Set this object to have the value represented by the specified `year`, `month`, and `day` if they comprise a valid `Date` value (see `isValidYearMonthDay`). Return 0 on success, and a non‐zero value (with no effect) otherwise. == Synopsis Declared in `<bdlt_date.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int validateAndSetYearMonthDay( int year, int month, int day); ---- == Description DEPRECATED: Use `setYearMonthDayIfValid` instead. [.small]#Created with https://www.mrdocs.com[MrDocs]#