[#BloombergLP-bdlt-Date-validateAndSetYearDay] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Date.adoc[Date]::validateAndSetYearDay :relfileprefix: ../../../ :mrdocs: Set this date from `year` and `dayOfYear` if they form a valid value. == Synopsis Declared in `<bdlt_date.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int validateAndSetYearDay( int year, int dayOfYear); ---- == Description Set this object to have the value represented by the specified `year` and `dayOfYear` if they comprise a valid `Date` value (see `isValidYearDay`). Return 0 on success, and a non‐zero value (with no effect) otherwise. DEPRECATED: Use `setYearDayIfValid` instead. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *year* | year of the candidate date | *dayOfYear* | day of year of the candidate date |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#