[time.cal.wdlast.overview]

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

## 30.8 The civil calendar [[time.cal]](time.cal#wdlast.overview)

### 30.8.8 Class weekday_last [[time.cal.wdlast]](time.cal.wdlast#overview)

#### 30.8.8.1 Overview [time.cal.wdlast.overview]

namespace std::chrono {class weekday_last { chrono::weekday wd_; // *exposition only*public:constexpr explicit weekday_last(const chrono::weekday& wd) noexcept; constexpr chrono::weekday weekday() const noexcept; constexpr bool ok() const noexcept; };}

[1](#1)

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

weekday_last represents the last weekday of a month[.](#1.sentence-1)

[2](#2)

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

[*Note [1](#note-1)*:

A weekday_last object
can be constructed by indexing a weekday with last[.](#2.sentence-1)

â *end note*]

[*Example [1](#example-1)*: constexpr auto wdl = Sunday[last]; // wdl is the last Sunday of an as yet unspecified monthstatic_assert(wdl.weekday() == Sunday); â *end example*]

[3](#3)

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

weekday_last is a trivially copyable and standard-layout class type[.](#3.sentence-1)
