Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

date::date (4 of 4 overloads)
PrevUpHomeNext

Constructs a date from a local time point.

Synopsis
explicit 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.


PrevUpHomeNext