std::chrono...::year_month(3)
π std::chrono::year_month::year_month π
okay bestie, welcome to the C++ Standard Libary manual, section 3 β this page is the <pink>std::chrono...::year_month(3)</pink> one, and it's literally all about std::chrono::year_month::year_month. Yes, βLibaryβ is the spelling, don't come for me. π
πΈ NAME πΈ
std::chrono::year_month::year_month β std::chrono::year_month::year_month
π¦ Synopsis π¦
year_month() = default; (1)
(since C++20)
constexpr year_month( const std::chrono::year& y, (2)
(since C++20)
const std::chrono::month& m ) noexcept;
Constructs a year_month object. That's the whole assignment, no cap.
- Default constructor β leaves the year and month uninitialized. (Yes, literally uninitialized. It does not set them. π)
- Constructs a
year_monthobject storing the yearyand the monthm.
π Notes π
A more convenient way to construct a year_month is with operator/, e.g., 2007y/std::chrono::April. It's giving shortcut slay. β¨
π₯ See also π₯
operator/β conventional syntax for Gregorian calendar date creation (C++20) (function).
mwah π β source: http://cppreference.com, version/date: 2024.06.10, page: std::chrono...::year_month(3). That's the cute sign-off, bestie. π«Ά
π¦ 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