std::chrono::year_month(3)
π NAME π
std::chrono::year_month β std::chrono::year_month (yes bestie, that's literally the name, we move π
)
β¨ Synopsis β¨
okay so this is the std::chrono::year_month(3) page from the C++ Standard Libary, and it's giving very specific calendar energy ποΈβ¨
Defined in header <chrono>
class year_month; (since C++20)
The class year_month represents a specific month of a specific year, but with an unspecified day. It is a field-based time point, with a resolution of std::chrono::months.
year_month is a TriviallyCopyable StandardLayoutType. no cap, it's that simple π«Ά
πΈ Member functions πΈ
constructorβ constructs ayear_month(public member function)yearβ accesses the stored year and month (public member function)monthβ (public member function)operator+=β modifies theyear_monthby some number of months or years (public member function)operator-=β (public member function)okβ checks if thisyear_monthis valid (public member function)
π Nonmember functions π
operator==β compares twoyear_monthvalues (function)operator<=>β (function) (C++20)operator+β performs arithmetic onyear_month(function) (C++20)operator-β (function) (C++20)operator<<β outputs ayear_monthinto a stream (C++20) (function template)from_streamβ parses ayear_monthfrom a stream according to the provided format (C++20) (function template)
π Helper classes π
std::formatter<std::chrono::year_month>β formatting support foryear_month(C++20) (class template specialization)std::hash<std::chrono::year_month>β hash support forstd::chrono::year_month(C++26) (class template specialization)
made with π on 2024.06.10 β source/version vibes: http://cppreference.com, page: std::chrono::year_month(3) β¨
π¦ 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