| Home | Libraries | People | FAQ | More

###### datetime::datetime (4 of 4 overloads)

Constructs a datetime from a `local_time_point`.

###### Synopsis

    explicit constexpr
    datetime(
        datetime::local_time_point 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 `datetime` object would be out of the [`min_datetime`, `max_datetime`] range.