命名空间
变体
操作

std::chrono::month

来自 cppreference.cn
< cpp‎ | chrono
 
 
 
 
定义于头文件 <chrono>
class month;
(since C++20)
inline constexpr std::chrono::month January{1};
(since C++20)
inline constexpr std::chrono::month February{2};
(since C++20)
inline constexpr std::chrono::month March{3};
(since C++20)
inline constexpr std::chrono::month April{4};
(since C++20)
inline constexpr std::chrono::month May{5};
(since C++20)
inline constexpr std::chrono::month June{6};
(since C++20)
inline constexpr std::chrono::month July{7};
(since C++20)
inline constexpr std::chrono::month August{8};
(since C++20)
inline constexpr std::chrono::month September{9};
(since C++20)
inline constexpr std::chrono::month October{10};
(since C++20)
inline constexpr std::chrono::month November{11};
(since C++20)
inline constexpr std::chrono::month December{12};
(since C++20)

month 表示一年中的月份。其正常范围是 [112],但它可以容纳 [0255] 中的任何数字。在 std::chrono 命名空间中为一年中的十二个月预定义了十二个命名常量。

monthTriviallyCopyable StandardLayoutType

[编辑] 成员函数

构造一个 month
(公开成员函数) [编辑]
递增或递减月份
(公开成员函数) [编辑]
增加或减少若干个月
(公开成员函数) [编辑]
检索存储的月份值
(公开成员函数) [编辑]
检查存储的月份值是否在正常范围内
(公开成员函数) [编辑]

[编辑] 非成员函数

比较两个 month
(函数) [编辑]
month 执行算术运算
(函数) [编辑]
month 输出到流
(函数模板) [编辑]
根据提供的格式从流中解析 month
(函数模板) [编辑]

[编辑] 辅助类

month 的格式化支持
(类模板特化) [编辑]
std::chrono::month 的哈希支持
(类模板特化)