dm.count()
months to the date represented by ymwd
. The result has the same year()
and month()
as std::chrono::year_month(ymwd.year(), ymwd.month()) + dm
and the same weekday()
and index()
as ymwd
.dy.count()
years to the date represented by ymwd
. The result is equivalent to std::chrono::year_month_weekday(ymwd.year() + dy, ymwd.month(), ymwd.weekday_indexed())
.dm.count()
months from the date represented by ymwd
. Equivalent to ymwd + -dm
.dy.count()
years from the date represented by ymwd
. Equivalent to ymwd + -dy
.Even if ymwd.ok()
is true, the resulting year_month_weekday
may not represent a valid date if ymwd.index()
is 5.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/chrono/year_month_weekday/operator_arith_2