std::chrono::year_month (3) - Linux Manuals

std::chrono::year_month: std::chrono::year_month

NAME

std::chrono::year_month - std::chrono::year_month

Synopsis


Defined in header <chrono>
class year_month; (since C++20)


The class year_month represents a specific month of a specific year, but with an unspecified day. It is a field-based time point, with a resolution of std::chrono::months.
year_month is a TriviallyCopyable StandardLayoutType.

Member functions


              constructs a year_month
constructor (public member function)
              accesses the stored year and month
year (public member function)
month
              modifies the year_month by some number of months or years
operator+= (public member function)
operator-=
              checks if this year_month is valid
ok (public member function)


Nonmember functions


operator==
operator!= compares two year_month objects
operator< (function)
operator<=
operator>
operator>=
            performs arithmetic on year_month
operator+ (function)
operator-
            outputs a year_month into a stream
operator<< (function template)
            outputs a year_month into a stream according to the provided format
to_stream (function template)
            parses a year_month from a stream according to the provided format
from_stream (function template)