std::chrono...onth_weekday(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 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 a year_month_weekday (public member function)
  • operator+= β€” modifies the time point by some number of months or years
  • operator-= β€” (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 a std::chrono::time_point (public member function)
  • ok β€” checks whether this object represents a valid date (public member function)

πŸ¦‹ NONMEMBER FUNCTIONS πŸ¦‹

  • operator== β€” compares two year_month_weekday values (C++20) (function)
  • operator+ β€” adds or subtracts a year_month_weekday and some number of years or months
  • operator- β€” (function) (C++20)
  • operator<< β€” outputs a year_month_weekday into a stream (C++20) (function template)

πŸŽ€ HELPER CLASSES πŸŽ€

  • std::formatter<std::chrono::year_month_weekday> β€” formatting support for year_month_weekday (C++20) (class template specialization)
  • std::hash<std::chrono::year_month_weekday> β€” hash support for std::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