d.count()
days to wd
. The weekday value held in the result is computed by first evaluating static_cast<long long>(unsigned(wd)) + d.count()
and reducing it modulo 7 to an integer in the range [0, 6].d.count()
days from wd
. Equivalent to return wd + -d;
wd1.ok()
and wd2.ok()
are both true
, returns a std::chrono::days
value d
such that d.count()
is in the range [0, 6] and wd2 + d == wd1
. Otherwise the returned value is unspecified.std::chrono::weekday
holding a weekday value calculated as described above.std::chrono::days
representing the distance between wd1
and wd2
.As long as the computation doesn't overflow, (1-3) always return a valid weekday
even if wd.ok()
is false
.
increments or decrements the weekday (public member function) |
|
adds or subtracts a number of days (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/chrono/weekday/operator_arith_2