# std::chrono::day

From cppreference.com
< cpp‎ | chrono

Defined in header `<chrono>` |  |
class day; |  | (since C++20)

The class `day` represents a day in a month. Its normal range is [1, 31], but it may hold any number in [0, 255].

`day` is a TriviallyCopyable StandardLayoutType.

### Member functions

(constructor) | constructs a `day` (public member function)
operator++operator++(int)operator--operator--(int) | increments or decrements the day (public member function)
operator+=operator-= | adds or subtracts a number of days (public member function)
operator unsigned | retrieves the stored day value (public member function)
ok | checks if the stored day value is in the normal range (public member function)

### Nonmember functions

operator==operator!=operator<operator<=operator>operator>= | compares two `day` objects (function)
operator+operator- | adds or subtracts a number of days and a `day`, or find the difference between two `day`s (function)
operator<< | outputs a `day` into a stream (function template)
to_stream | outputs a `day` into a stream according to the provided format (function template)
from_stream | parses a `day` from a stream according to the provided format (function template)

### Literals

Defined in inline namespace `std::literals::chrono_literals`
operator""d (C++20) | A std::chrono::day literal representing a day of a month (function)

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/day&oldid=104649"