[time.cal.ymwdlast.nonmembers]

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

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

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

#### 30.8.17.3 Non-member functions [time.cal.ymwdlast.nonmembers]

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

`constexpr bool operator==(const year_month_weekday_last& x,
                          const year_month_weekday_last& y) noexcept;
`

[1](#1)

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

*Returns*: x.year() == y.year() && x.month() == y.month() && x.weekday_last() == y.weekday_last()

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

`constexpr year_month_weekday_last
  operator+(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
`

[2](#2)

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

*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#L7803)

*Returns*: (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last()[.](#3.sentence-1)

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

`constexpr year_month_weekday_last
  operator+(const months& dm, const year_month_weekday_last& ymwdl) noexcept;
`

[4](#4)

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

*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"))[.](#4.sentence-1)

[5](#5)

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

*Returns*: ymwdl + dm[.](#5.sentence-1)

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

`constexpr year_month_weekday_last
  operator-(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
`

[6](#6)

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

*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"))[.](#6.sentence-1)

[7](#7)

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

*Returns*: ymwdl + (-dm)[.](#7.sentence-1)

[ð](#lib:operator+,year_month_weekday_last__)

`constexpr year_month_weekday_last
  operator+(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
`

[8](#8)

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

*Returns*: {ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()}[.](#8.sentence-1)

[ð](#lib:operator+,year_month_weekday_last___)

`constexpr year_month_weekday_last
  operator+(const years& dy, const year_month_weekday_last& ymwdl) noexcept;
`

[9](#9)

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

*Returns*: ymwdl + dy[.](#9.sentence-1)

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

`constexpr year_month_weekday_last
  operator-(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
`

[10](#10)

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

*Returns*: ymwdl + (-dy)[.](#10.sentence-1)

[ð](#lib:operator%3c%3c,year_month_weekday_last)

`template<class charT, class traits>
  basic_ostream<charT, traits>&
    operator<<(basic_ostream<charT, traits>& os, const year_month_weekday_last& ymwdl);
`

[11](#11)

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

*Effects*: Equivalent to:return os << format(os.getloc(), *STATICALLY-WIDEN*<charT>("{}/{:L}/{:L}"),
 ymwdl.year(), ymwdl.month(), ymwdl.weekday_last());
