constexpr std::chrono::year year() const noexcept; | (1) | (since C++20) |
constexpr std::chrono::month month() const noexcept; | (2) | (since C++20) |
constexpr std::chrono::day day() const noexcept; | (3) | (since C++20) |
constexpr std::chrono::month_day_last month_day_last() const noexcept; | (4) | (since C++20) |
Retrieves the field values stored in this year_month_day_last
object.
std::chrono::year
value.std::chrono::month
value.std::chrono::day
value corresponding to the last day of the stored year and month.std::chrono::month_day_last
constructed from month()
.The behavior of (3) when !this->ok()
is not currently defined. It likely will be defined to return some invalid day in that case (such as std::chrono::day(0)
).
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/chrono/year_month_day_last/accessors