Return a Date for year/month/day if valid; otherwise empty.
Declared in <bdlt_dateutil.h>
static
bsl::optional<Date>
fromYmd(
int year,
int month,
int day);
Return an optional having a Date with the specified year, month, and day, if those form a valid Date (see Date::isValid); otherwise return an optional without a value.
optional date, empty if the YMD is invalid
| Name | Description |
|---|---|
| year | calendar year |
| month | month of year |
| day | day of month |