On this page
std::chrono::year
Defined in header <chrono> |
||
---|---|---|
|
(since C++20) |
The class year
represents a year in the proleptic Gregorian calendar. Its range is [
-32767,
32767]
.
year
is a TriviallyCopyable StandardLayoutType.
Member functions
constructs a year (public member function) |
|
increments or decrements the year (public member function) |
|
adds or subtracts a number of years from a year (public member function) |
|
applies unary operators to year (public member function) |
|
determines if the year is a leap year (public member function) |
|
retrieve the year value (public member function) |
|
checks if the stored year value is valid (public member function) |
|
[static]
|
returns the smallest possible year value (public static member function) |
[static]
|
returns the largest possible year (public static member function) |
Non-member functions
(C++20)
|
compares two year values (function) |
(C++20)
|
performs arithmetic on year s (function) |
(C++20)
|
outputs a year into a stream (function template) |
(C++20)
|
parses a year from a stream according to the provided format (function template) |
Helper classes
(C++20)
|
formatting support for year (class template specialization) |
(C++26)
|
hash support for std::chrono::year (class template specialization) |
Literals
Defined in inline namespace std::literals::chrono_literals |
|
---|---|
(C++20)
|
a std::chrono::year literal representing a particular year (function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/chrono/year