30
Time library
[time]
30.8
The civil calendar
[time.cal]
30.8.16
Class
year_
month_
weekday
[time.cal.ymwd]
30.8.16.1
Overview
[time.cal.ymwd.overview]
namespace
std
::
chrono
{
class
year_month_weekday
{
chrono
::
year y_;
//
exposition only
chrono
::
month m_;
//
exposition only
chrono
::
weekday_indexed wdi_;
//
exposition only
public
:
year_month_weekday
(
)
=
default
;
constexpr
year_month_weekday
(
const
chrono
::
year
&
y,
const
chrono
::
month
&
m,
const
chrono
::
weekday_indexed
&
wdi
)
noexcept
;
constexpr
year_month_weekday
(
const
sys_days
&
dp
)
noexcept
;
constexpr
explicit
year_month_weekday
(
const
local_days
&
dp
)
noexcept
;
constexpr
year_month_weekday
&
operator
+
=
(
const
months
&
m
)
noexcept
;
constexpr
year_month_weekday
&
operator
-
=
(
const
months
&
m
)
noexcept
;
constexpr
year_month_weekday
&
operator
+
=
(
const
years
&
y
)
noexcept
;
constexpr
year_month_weekday
&
operator
-
=
(
const
years
&
y
)
noexcept
;
constexpr
chrono
::
year year
(
)
const
noexcept
;
constexpr
chrono
::
month month
(
)
const
noexcept
;
constexpr
chrono
::
weekday weekday
(
)
const
noexcept
;
constexpr
unsigned
index
(
)
const
noexcept
;
constexpr
chrono
::
weekday_indexed weekday_indexed
(
)
const
noexcept
;
constexpr
operator
sys_days
(
)
const
noexcept
;
constexpr
explicit
operator
local_days
(
)
const
noexcept
;
constexpr
bool
ok
(
)
const
noexcept
;
}
;
}
1
#
year_
month_
weekday
represents a specific year, month, and
n
th
weekday of the month
.
year_
month_
weekday
is a field-based time point with a resolution of
days
.
[
Note
1
:
year_
month_
weekday
supports
years
- and
months
-oriented arithmetic, but not
days
-oriented arithmetic
.
For the latter, there is a conversion to
sys_
days
, which efficiently supports
days
-oriented arithmetic
.
—
end note
]
year_
month_
weekday
meets the
Cpp17EqualityComparable
(Table
28
) requirements
.
2
#
year_
month_
weekday
is a trivially copyable and standard-layout class type
.