[time.cal.ymwdlast.members]

# 30 Time library [[time]](./#time)

## 30.8 The civil calendar [[time.cal]](time.cal#ymwdlast.members)

### 30.8.17 Class year_month_weekday_last [[time.cal.ymwdlast]](time.cal.ymwdlast#members)

#### 30.8.17.2 Member functions [time.cal.ymwdlast.members]

[ð](#lib:year_month_weekday_last,constructor)

`constexpr year_month_weekday_last(const chrono::year& y, const chrono::month& m,
                                  const chrono::weekday_last& wdl) noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7611)

*Effects*: Initializes y_ with y, m_ with m, and wdl_ with wdl[.](#1.sentence-1)

[ð](#lib:operator+=,year_month_weekday_last)

`constexpr year_month_weekday_last& operator+=(const months& m) noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7622)

*Constraints*: If the argument supplied by the caller for the months parameter
is convertible to years,
its implicit conversion sequence to years is worse than its implicit conversion sequence tomonths ([[over.ics.rank]](over.ics.rank "12.2.4.3 Ranking implicit conversion sequences"))[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7630)

*Effects*: *this = *this + m[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7634)

*Returns*: *this[.](#4.sentence-1)

[ð](#lib:operator-=,year_month_weekday_last)

`constexpr year_month_weekday_last& operator-=(const months& m) noexcept;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7645)

*Constraints*: If the argument supplied by the caller for the months parameter
is convertible to years,
its implicit conversion sequence to years is worse than its implicit conversion sequence tomonths ([[over.ics.rank]](over.ics.rank "12.2.4.3 Ranking implicit conversion sequences"))[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7653)

*Effects*: *this = *this - m[.](#6.sentence-1)

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7657)

*Returns*: *this[.](#7.sentence-1)

[ð](#lib:operator+=,year_month_weekday_last_)

`constexpr year_month_weekday_last& operator+=(const years& y) noexcept;
`

[8](#8)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7668)

*Effects*: *this = *this + y[.](#8.sentence-1)

[9](#9)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7672)

*Returns*: *this[.](#9.sentence-1)

[ð](#lib:operator-=,year_month_weekday_last_)

`constexpr year_month_weekday_last& operator-=(const years& y) noexcept;
`

[10](#10)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7683)

*Effects*: *this = *this - y[.](#10.sentence-1)

[11](#11)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7687)

*Returns*: *this[.](#11.sentence-1)

[ð](#lib:year,year_month_weekday_last)

`constexpr chrono::year year() const noexcept;
`

[12](#12)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7698)

*Returns*: y_[.](#12.sentence-1)

[ð](#lib:month,year_month_weekday_last)

`constexpr chrono::month month() const noexcept;
`

[13](#13)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7709)

*Returns*: m_[.](#13.sentence-1)

[ð](#lib:weekday,year_month_weekday_last)

`constexpr chrono::weekday weekday() const noexcept;
`

[14](#14)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7720)

*Returns*: wdl_.weekday()[.](#14.sentence-1)

[ð](#lib:weekday_last,year_month_weekday_last)

`constexpr chrono::weekday_last weekday_last() const noexcept;
`

[15](#15)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7731)

*Returns*: wdl_[.](#15.sentence-1)

[ð](#lib:operator_sys_days,year_month_weekday_last)

`constexpr operator sys_days() const noexcept;
`

[16](#16)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7742)

*Returns*: If ok() == true,
returns a sys_days that represents
the last weekday() of year()/month()[.](#16.sentence-1)

Otherwise the returned value is unspecified[.](#16.sentence-2)

[ð](#lib:operator_local_days,year_month_weekday_last)

`constexpr explicit operator local_days() const noexcept;
`

[17](#17)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7756)

*Returns*: local_days{sys_days{*this}.time_since_epoch()}[.](#17.sentence-1)

[ð](#lib:ok,year_month_weekday_last)

`constexpr bool ok() const noexcept;
`

[18](#18)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L7767)

*Returns*: y_.ok() && m_.ok() && wdl_.ok()[.](#18.sentence-1)
