| Home | Libraries | People | FAQ | More

###### date::date (4 of 4 overloads)

Constructs a date from a local time point.

###### Synopsis

    constexpr
    date(
        std::chrono::local_days tp);

###### Description

Equivalent to constructing a `date` from a `time_point` with the same `time_since_epoch()` as `tp`.

Requires C++20 calendar types.

###### Exception safety

Strong guarantee. Throws on invalid input.

###### Exceptions

Type | Thrown On
--- | ---
`std::out_of_range` | If the resulting `date` would be out of the [`min_date`, `max_date`] range.