|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <chrono> | ||
class month; | (since C++20) | |
inlineconstexpr std::chrono::month January{1}; | (since C++20) | |
inlineconstexpr std::chrono::month February{2}; | (since C++20) | |
inlineconstexpr std::chrono::month March{3}; | (since C++20) | |
inlineconstexpr std::chrono::month April{4}; | (since C++20) | |
inlineconstexpr std::chrono::month May{5}; | (since C++20) | |
inlineconstexpr std::chrono::month June{6}; | (since C++20) | |
inlineconstexpr std::chrono::month July{7}; | (since C++20) | |
inlineconstexpr std::chrono::month August{8}; | (since C++20) | |
inlineconstexpr std::chrono::month September{9}; | (since C++20) | |
inlineconstexpr std::chrono::month October{10}; | (since C++20) | |
inlineconstexpr std::chrono::month November{11}; | (since C++20) | |
inlineconstexpr std::chrono::month December{12}; | (since C++20) | |
The classmonth represents a month in a year. Its normal range is[1, 12], but it may hold any number in[0, 255]. Twelve named constants are predefined in thestd::chrono namespace for the twelve months of the year.
month is aTriviallyCopyableStandardLayoutType.
constructs amonth(public member function)[edit] | |
| increments or decrements the month (public member function)[edit] | |
| adds or subtracts a number of months (public member function)[edit] | |
| retrieves the stored month value (public member function)[edit] | |
| checks if the stored month value is in the normal range (public member function)[edit] |
(C++20) | compares twomonth values(function)[edit] |
(C++20) | performs arithmetic onmonths(function)[edit] |
(C++20) | outputs amonth into a stream(function template)[edit] |
(C++20) | parses amonth from a stream according to the provided format(function template)[edit] |
formatting support formonth(class template specialization)[edit] | |
| hash support forstd::chrono::month (class template specialization) |