std::chrono::weekday_indexed::ok

constexpr bool ok() const noexcept;
(C++20 起)

检查存储于 *this 的 weekday 对象和下标是否均合法。

返回值

weekday().ok() == trueindex() 在范围 [1, 5] 中则为 true 。否则为 false