std::chrono::year_month_weekday_last::operator sys_days, std::chrono::year_month_weekday_last::operator local_days
来自cppreference.com
< cpp | chrono | year month weekday
last
工具库
日期和时间工具
时间点 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时长 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时钟 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
当天时刻 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
日历 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时区 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chrono
I/O
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++20)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
C 风格日期和时间 |
std::chrono::year_month_weekday_last
成员函数 | ||||
year_month_weekday_last::operator
sys_daysyear_month_weekday_last::operator
local_days
|
||||
非成员函数 | ||||
辅助类 | ||||
constexpr
operator std::chrono::sys_days()
const
noexcept;
|
(1) | (C++20 起) |
explicit
constexpr
operator std::chrono::local_days()
const
noexcept;
|
(2) | (C++20 起) |
将 *this
转换成与此 year_month_weekday_last
表示相同时间点的
std::chrono::time_point
。
1) 若 ok()
为 true ,则返回表示该
year() 和 month()
的最后一个 weekday() 的
sys_days
。否则返回值未指定。2) 同 (1)
,但返回
local_days
而非 sys_days
。等价于 local_days(sys_days(*this).time_since_epoch()) 。