[time.cal.wdidx.members]

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

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

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

#### 30.8.7.2 Member functions [time.cal.wdidx.members]

[ð](#lib:weekday_indexed,constructor)

`constexpr weekday_indexed(const chrono::weekday& wd, unsigned index) noexcept;
`

[1](#1)

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

*Effects*: Initializes wd_ with wd and index_ with index[.](#1.sentence-1)

The values held are unspecified if !wd.ok() or index is not in the range [0, 7][.](#1.sentence-2)

[ð](#lib:weekday,weekday_indexed)

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

[2](#2)

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

*Returns*: wd_[.](#2.sentence-1)

[ð](#lib:index,weekday_indexed)

`constexpr unsigned index() const noexcept;
`

[3](#3)

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

*Returns*: index_[.](#3.sentence-1)

[ð](#lib:ok,weekday_indexed)

`constexpr bool ok() const noexcept;
`

[4](#4)

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

*Returns*: wd_.ok() && 1 <= index_ && index_ <= 5[.](#4.sentence-1)
