std::chrono::year

From cppreference.com
< cpp‎ | chrono
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)
 
 
 
Defined in header <chrono>
class year;
(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

compares two year values
(function)
performs arithmetic on years
(function)
outputs a year into a stream
(function template)
parses a year from a stream according to the provided format
(function template)

Helper classes

specialization of std::formatter that formats a year according to the provided format
(class template specialization)

Literals

Defined in inline namespace std::literals::chrono_literals
A std::chrono::year literal representing a particular year
(function)