[time.cal.day.members]

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

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

### 30.8.3 Class day [[time.cal.day]](time.cal.day#members)

#### 30.8.3.2 Member functions [time.cal.day.members]

[ð](#lib:day,constructor)

`constexpr explicit day(unsigned d) noexcept;
`

[1](#1)

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

*Effects*: Initializes d_ with d[.](#1.sentence-1)

The value held is unspecified if d is not in the range [0, 255][.](#1.sentence-2)

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

`constexpr day& operator++() noexcept;
`

[2](#2)

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

*Effects*: ++d_[.](#2.sentence-1)

[3](#3)

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

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

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

`constexpr day operator++(int) noexcept;
`

[4](#4)

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

*Effects*: ++(*this)[.](#4.sentence-1)

[5](#5)

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

*Returns*: A copy of *this as it existed on entry to this member function[.](#5.sentence-1)

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

`constexpr day& operator--() noexcept;
`

[6](#6)

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

*Effects*: Equivalent to: --d_[.](#6.sentence-1)

[7](#7)

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

*Returns*: *this[.](#7.sentence-1)

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

`constexpr day operator--(int) noexcept;
`

[8](#8)

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

*Effects*: --(*this)[.](#8.sentence-1)

[9](#9)

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

*Returns*: A copy of *this as it existed on entry to this member function[.](#9.sentence-1)

[ð](#lib:operator+=,day)

`constexpr day& operator+=(const days& d) noexcept;
`

[10](#10)

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

*Effects*: *this = *this + d[.](#10.sentence-1)

[11](#11)

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

*Returns*: *this[.](#11.sentence-1)

[ð](#lib:operator-=,day)

`constexpr day& operator-=(const days& d) noexcept;
`

[12](#12)

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

*Effects*: *this = *this - d[.](#12.sentence-1)

[13](#13)

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

*Returns*: *this[.](#13.sentence-1)

[ð](#lib:operator_unsigned,day)

`constexpr explicit operator unsigned() const noexcept;
`

[14](#14)

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

*Returns*: d_[.](#14.sentence-1)

[ð](#lib:ok,day)

`constexpr bool ok() const noexcept;
`

[15](#15)

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

*Returns*: 1 <= d_ && d_ <= 31[.](#15.sentence-1)
