std::chrono::month
在标头
<chrono> 定义 |
||
class month;
|
(C++20 起) | |
inline constexpr std::chrono::month January{1};
|
(C++20 起) | |
inline constexpr std::chrono::month February{2};
|
(C++20 起) | |
inline constexpr std::chrono::month March{3};
|
(C++20 起) | |
inline constexpr std::chrono::month April{4};
|
(C++20 起) | |
inline constexpr std::chrono::month May{5};
|
(C++20 起) | |
inline constexpr std::chrono::month June{6};
|
(C++20 起) | |
inline constexpr std::chrono::month July{7};
|
(C++20 起) | |
inline constexpr std::chrono::month August{8};
|
(C++20 起) | |
inline constexpr std::chrono::month September{9};
|
(C++20 起) | |
inline constexpr std::chrono::month October{10};
|
(C++20 起) | |
inline constexpr std::chrono::month November{11};
|
(C++20 起) | |
inline constexpr std::chrono::month December{12};
|
(C++20 起) | |
类 month
表示年中的月。它的正常范围是 [
1,
12]
,但它可保有 [
0,
255]
中的任何数。在 std::chrono
命名空间中为年的十二个月份定义十二个具名常量。
month
是可平凡复制 (TriviallyCopyable) 的标准布局类型 (StandardLayoutType) 。
成员函数
构造 month (公开成员函数) |
|
自增或自减 month (公开成员函数) |
|
加上或减去月数 (公开成员函数) |
|
取得存储的月份值 (公开成员函数) |
|
检查存储的月份值是否在正常范围中 (公开成员函数) |
非成员函数
(C++20)
|
比较两个 month 值(函数) |
(C++20)
|
进行 month 上的算术(函数) |
(C++20)
|
输出 month 到流中(函数模板) |
(C++20)
|
按照提供的格式从流分析 month (函数模板) |
辅助类
month 的格式化支持(类模板特化) |
|
(C++26)
|
std::chrono::month 的散列支持 (类模板特化) |