名稱空間
變體
操作

std::chrono::month

來自 cppreference.com
< cpp‎ | chrono
 
 
 
 
定義於標頭檔案 <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 類表示一年中的月份。它的正常範圍是 [112],但它可以持有 [0255] 中的任何數字。在 std::chrono 名稱空間中預定義了十二個命名常量,分別對應一年中的十二個月。

month 是一個 TriviallyCopyable StandardLayoutType

[編輯] 成員函式

構造一個 month
(公有成員函式) [編輯]
增加或減少月份
(公有成員函式) [編輯]
增加或減少月份數
(公有成員函式) [編輯]
檢索儲存的月份值
(公有成員函式) [編輯]
檢查儲存的月份值是否在正常範圍內
(公有成員函式) [編輯]

[編輯] 非成員函式

比較兩個 month
(函式) [編輯]
month 進行算術運算
(函式) [編輯]
month 輸出到流中
(函式模板) [編輯]
根據提供的格式從流中解析 month
(函式模板) [編輯]

[編輯] 輔助類

month 的格式化支援
(類模板特化) [編輯]
std::chrono::month 的雜湊支援
(類模板特化)