std::chrono::year_month:: year_month
From cppreference.net
<
cpp
|
chrono
|
year month
C++
Date and time library
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::year_month
| Member functions | ||||
|
year_month::year_month
|
||||
| Nonmember functions | ||||
| Helper classes | ||||
|
(C++26)
|
|
year_month
(
)
=
default
;
|
(1) | (depuis C++20) |
|
constexpr
year_month
(
const
std::
chrono
::
year
&
y,
const std:: chrono :: month & m ) noexcept ; |
(2) | (depuis C++20) |
Construit un objet
year_month
.
1)
Le constructeur par défaut laisse l'année et le mois non initialisés.
2)
Construit un objet
year_month
stockant l'année
y
et le mois
m
.
Notes
Une manière plus pratique de construire un
year_month
est d'utiliser
operator
/
, par exemple,
2007y
/
std::
chrono
::
April
.
Voir aussi
|
(C++20)
|
syntaxe conventionnelle pour la création de dates du calendrier grégorien
(fonction) |