|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Nonmember functions | ||||
| Helper classes | ||||
(C++26) |
Defined in header <chrono> | ||
class year; | (since C++20) | |
The classyear represents a year in theproleptic Gregorian calendar. Its range is[-32767, 32767].
year is aTriviallyCopyableStandardLayoutType.
Contents |
constructs ayear(public member function)[edit] | |
| increments or decrements the year (public member function)[edit] | |
adds or subtracts a number of years from ayear(public member function)[edit] | |
applies unary operators toyear(public member function)[edit] | |
| determines if the year is a leap year (public member function)[edit] | |
| retrieve the year value (public member function)[edit] | |
| checks if the stored year value is valid (public member function)[edit] | |
[static] | returns the smallest possible year value (public static member function)[edit] |
[static] | returns the largest possibleyear(public static member function)[edit] |
(C++20) | compares twoyear values(function)[edit] |
(C++20) | performs arithmetic onyears(function)[edit] |
(C++20) | outputs ayear into a stream(function template)[edit] |
(C++20) | parses ayear from a stream according to the provided format(function template)[edit] |
formatting support foryear(class template specialization)[edit] | |
(C++26) | hash support forstd::chrono::year (class template specialization) |
Defined in inline namespace std::literals::chrono_literals | |
(C++20) | astd::chrono::year literal representing a particular year (function)[edit] |