std::chrono::day - cppreference.com (original) (raw)
std::chrono::day
| Member functions |
|---|
| day::day |
| day::operator++day::operator-- |
| day::operator+=day::operator-= |
| day::operator unsigned |
| day::ok |
| Nonmember functions |
| operator==operator<=> |
| operator+operator- |
| operator<< |
| from_stream |
| [operator""d](operator%2522%2522d.html "cpp/chrono/operator""d") |
| Helper classes |
| formatterstd::chrono::day |
| hashstd::chrono::day(C++26) |
| Defined in header | | | | ----------------------------------------------------------------------- | | ------------- | | 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.
Contents
[edit] Member functions
| (constructor) | constructs a day (public member function) [edit] |
|---|---|
| operator++operator++(int)operator--operator--(int) | increments or decrements the day (public member function) [edit] |
| operator+=operator-= | adds or subtracts a number of days (public member function) [edit] |
| operator unsigned | retrieves the stored day value (public member function) [edit] |
| ok | checks if the stored day value is in the normal range (public member function) [edit] |
[edit] Nonmember functions
| operator==operator<=>(C++20) | compares two day values (function) [edit] |
|---|---|
| operator+operator-(C++20) | adds or subtracts a number of days and a day, or find the difference between two days (function) [edit] |
| operator<<(C++20) | outputs a day into a stream (function template) [edit] |
| from_stream(C++20) | parses a day from a stream according to the provided format (function template) [edit] |
[edit] Helper classes
| std::formatterstd::chrono::day(C++20) | formatting support for day (class template specialization) [edit] |
|---|---|
| std::hashstd::chrono::day(C++26) | hash support for std::chrono::day (class template specialization) |
[edit] Literals
| Defined in inline namespace std::literals::chrono_literals | |
|---|---|
| [ operator""d](operator%2522%2522d.html "cpp/chrono/operator""d")(C++20) | a std::chrono::day literal representing a day of a month (function) [edit] |