Defined in header <chrono> | ||
---|---|---|
constexpr std::chrono::year_month_day_last operator+(const std::chrono::year_month_day_last& ymdl, const std::chrono::months& dm) noexcept; | (since C++20) | |
constexpr std::chrono::year_month_day_last operator+(const std::chrono::months& dm, const std::chrono::year_month_day_last& ymdl) noexcept; | (since C++20) | |
constexpr std::chrono::year_month_day_last operator+(const std::chrono::year_month_day_last& ymdl, const std::chrono::years& dy) noexcept; | (since C++20) | |
constexpr std::chrono::year_month_day_last operator+(const std::chrono::years& dy, const std::chrono::year_month_day_last& ymdl) noexcept; | (since C++20) | |
constexpr std::chrono::year_month_day_last operator-(const std::chrono::year_month_day_last& ymdl, const std::chrono::months& dm) noexcept; | (since C++20) | |
constexpr std::chrono::year_month_day_last operator-(const std::chrono::year_month_day_last& ymdl, const std::chrono::years& dy) noexcept; | (since C++20) |
dm.count()
months to the date represented by ymdl
. The result has the same year()
and month()
as std::chrono::year_month(ymdl.year(), ymdl.month()) + dm
.dy.count()
years to the date represented by ymdl
. The result is equivalent to std::chrono::year_month_day_last(ymdl.year() + dy, ymdl.month_day_last())
.dm.count()
months from the date represented by ymdl
. Equivalent to ymdl + -dm
.dy.count()
years from the date represented by ymdl
. Equivalent to ymdl + -dy
.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/chrono/year_month_day_last/operator_arith_2