Namespaces
Variants
Views
Actions

std::chrono::day

From cppreference.com
< cpp‎ | chrono
 
 
 
Date and time utilities
(C++11)
(C++11)
Clocks
(C++20)
                                                  
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Calendars
day
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Time zones
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
C-style date and time
 
 
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.

Contents

[edit] Member functions

constructs a day
(public member function) [edit]
increments or decrements the day
(public member function) [edit]
adds or subtracts a number of days
(public member function) [edit]
retrieves the stored day value
(public member function) [edit]
checks if the stored day value is in the normal range
(public member function) [edit]

[edit] Nonmember functions

compares two day objects
(function) [edit]
adds or subtracts a number of days and a day, or find the difference between two days
(function) [edit]
outputs a day into a stream
(function template) [edit]
parses a day from a stream according to the provided format
(function template) [edit]

[edit] Helper classes

specialization of std::formatter that formats a day according to the provided format
(class template specialization) [edit]

[edit] Literals

Defined in inline namespace std::literals::chrono_literals
A std::chrono::day literal representing a day of a month
(function) [edit]