[time.cal.wdidx.nonmembers]

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

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

### 30.8.7 Class weekday_indexed [[time.cal.wdidx]](time.cal.wdidx#nonmembers)

#### 30.8.7.3 Non-member functions [time.cal.wdidx.nonmembers]

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

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

[1](#1)

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

*Returns*: x.weekday() == y.weekday() && x.index() == y.index()[.](#1.sentence-1)

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

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

[2](#2)

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

*Effects*: Equivalent to:auto i = wdi.index();return os << (i >= 1 && i <= 5 ? format(os.getloc(), *STATICALLY-WIDEN*<charT>("{:L}[{}]"), wdi.weekday(), i) : format(os.getloc(), *STATICALLY-WIDEN*<charT>("{:L}[{} is not a valid index]"),
 wdi.weekday(), i));
