table of contents
std::chrono::day(3) | C++ Standard Libary | std::chrono::day(3) |
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¶
constructor constructs a day
(public member function)
operator++
operator++(int) increments or decrements the day
operator-- (public member function)
operator--(int)
operator+= adds or subtracts a number of days
operator-= (public member function)
operator unsigned retrieves the stored day value
(public member function)
ok checks if the stored day value is in the normal range
(public member function)
Nonmember functions
operator== compares two day values
operator<=> (function)
(C++20)
operator+ adds or subtracts a number of days and a day, or find the
difference
operator- between two days
(C++20) (function)
operator<< outputs a day into a stream
(C++20) (function template)
from_stream parses a day from a stream according to the provided format
(C++20) (function template)
Helper classes¶
std::formatter<std::chrono::day> formatting support for day
(C++20) (class template specialization)
std::hash<std::chrono::day> hash support for std::chrono::day
(C++26) (class template specialization)
Literals¶
Defined in inline namespace std::literals::chrono_literals
operator""d a std::chrono::day literal representing a day of a
month
(C++20) (function)
2024.06.10 | http://cppreference.com |