std::chrono::year_month:: year_month
From ja.cppreference.net
<
cpp
|
chrono
|
year month
|
year_month
(
)
=
default
;
|
(1) | (C++20以降) |
|
constexpr
year_month
(
const
std::
chrono
::
year
&
y,
const std:: chrono :: month & m ) noexcept ; |
(2) | (C++20以降) |
year_monthオブジェクトを構築します。
1)
デフォルトコンストラクタはyearとmonthを初期化しません。
2)
year_monthオブジェクトを構築し、年
y
と月
m
を格納します。
注記
year_monthを構築するより便利な方法は、
operator
/
を使用することです。例えば、
2007y
/
std::
chrono
::
April
のように記述します。
関連項目
|
(C++20)
|
グレゴリオ暦の日付作成における従来の構文
(関数) |