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

std::chrono::day: std::chrono::day

NAME

std::chrono::day - std::chrono::day

Synopsis


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


The class day represents a day in a month. Its normal range is [1, 31], but it may hold any number in [0, 255].
day is a TriviallyCopyable StandardLayoutType.

Member functions


                  constructs a day
constructor (public member function)


operator++ increments or decrements the day
operator++(int) (public member function)
operator--
operator--(int)
                  adds or subtracts a number of days
operator+= (public member function)
operator-=
                  retrieves the stored day value
operator_unsigned (public member function)
                  checks if the stored day value is in the normal range
ok (public member function)


Nonmember functions


operator==
operator!= compares two day objects
operator< (function)
operator<=
operator>
operator>=
            adds or subtracts a number of days and a day, or find the difference between two days
operator+ (function)
operator-
            outputs a day into a stream
operator<< (function template)
            outputs a day into a stream according to the provided format
to_stream (function template)
            parses a day from a stream according to the provided format
from_stream (function template)

Literals


Defined in inline namespace std::literals::chrono_literals


operator""d A std::chrono::day literal representing a day of a month
            (function)
(C++20)