[time.cal.ymwd.nonmembers]

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

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

### 30.8.16 Class year_month_weekday [[time.cal.ymwd]](time.cal.ymwd#nonmembers)

#### 30.8.16.3 Non-member functions [time.cal.ymwd.nonmembers]

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

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

[1](#1)

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

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

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

`constexpr year_month_weekday operator+(const year_month_weekday& ymwd, const months& dm) noexcept;
`

[2](#2)

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

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

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

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

`constexpr year_month_weekday operator+(const months& dm, const year_month_weekday& ymwd) noexcept;
`

[4](#4)

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

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

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

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

`constexpr year_month_weekday operator-(const year_month_weekday& ymwd, const months& dm) noexcept;
`

[6](#6)

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

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

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

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

`constexpr year_month_weekday operator+(const year_month_weekday& ymwd, const years& dy) noexcept;
`

[8](#8)

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

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

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

`constexpr year_month_weekday operator+(const years& dy, const year_month_weekday& ymwd) noexcept;
`

[9](#9)

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

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

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

`constexpr year_month_weekday operator-(const year_month_weekday& ymwd, const years& dy) noexcept;
`

[10](#10)

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

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

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

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

[11](#11)

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

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