std::chrono...onth_weekday(3)
πΈ NAME πΈ
std::chrono::year_month_weekday β okay so this is the manual page for std::chrono...onth_weekday(3), and it's literally the C++ chrono class that reps the n^th weekday of a specific year and month. Iconic behavior only. π
β¨ SYNOPSIS β¨
Defined in header <chrono>
class year_month_weekday; (since C++20)
Okay bestie, picture this: the class year_month_weekday represents the n^th weekday of a specific year and month. It is a field-based time point, with a resolution of std::chrono::days.
std::chrono::years- and std::chrono::months-oriented arithmetic are supported directly. No cap, that's just how it is.
An implicit conversion to and from std::chrono::sys_days allows std::chrono::days-oriented arithmetic to be performed efficiently. So it's giving convenience, it's giving range, it's giving slay.
Also important: year_month_weekday is a TriviallyCopyable StandardLayoutType. Lowkey well-behaved. Periodt.
π MEMBER FUNCTIONS π
constructorβ constructs ayear_month_weekday(public member function)operator+=β modifies the time point by some number of months or yearsoperator-=β (public member function)year,month,weekday,index,weekday_indexedβ accesses the fields of this object (public member function)operator sys_days,operator local_daysβ converts to astd::chrono::time_point(public member function)okβ checks whether this object represents a valid date (public member function)
π¦ NONMEMBER FUNCTIONS π¦
operator==β compares twoyear_month_weekdayvalues(C++20)(function)operator+β adds or subtracts ayear_month_weekdayand some number of years or monthsoperator-β(function)(C++20)operator<<β outputs ayear_month_weekdayinto a stream(C++20)(function template)
π HELPER CLASSES π
std::formatter<std::chrono::year_month_weekday>β formatting support foryear_month_weekday(C++20)(class template specialization)std::hash<std::chrono::year_month_weekday>β hash support forstd::chrono::year_month_weekday(C++26)(class template specialization)
And that's the whole vibe check, bestie! Source: http://cppreference.com Β· version date: 2024.06.10 Β· manual page: std::chrono...onth_weekday(3). Go slay your chrono arithmetic, fr fr πβ¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms