std::chrono...weekday_last(3)

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

πŸŽ€ NAME πŸŽ€

Okay bestie, welcome to the std::chrono...weekday_last(3) page from the C++ Standard Libary πŸ’– This is the constructor page for std::chrono::year_month_weekday_last, and the full name is literally std::chrono::year_month_weekday_last::year_month_weekday_last β€” and yes, the NAME line repeats that exact same string on both sides of the dash, because repetition is the brand πŸ‘‘


✨ Synopsis ✨

Here’s the exact signature, preserved character for character like a sacred little text 🫢

          constexpr

          year_month_weekday_last( const std::chrono::year& y, const
          std::chrono::month& m,
       (since C++20)

                                   const std::chrono::weekday_last& wdl )
          noexcept;

So what does it do? It constructs a year_month_weekday_last object storing the year y, the month m, and the weekday wdl.weekday(). The constructed object represents the last weekday of that year and month. That’s the whole vibe: year + month + last weekday, assembled πŸ—“οΈβœ¨


πŸ¦‹ Notes πŸ¦‹

Plot twist, you don’t only get here through the constructor. A year_month_weekday_last can also be created by combining one of the partial-date types std::chrono::year_month and std::chrono::month_weekday_last with the missing component (weekday_last and year, respectively) using operator/. That’s the lowkey iconic combo move πŸ’…


πŸ’œ See also πŸ’œ

  • operator/ β€” conventional syntax for Gregorian calendar date creation (C++20) (function)

xoxo, your chrono bestie πŸ’– source/version: http://cppreference.com Β· page date: 2024.06.10 Β· manual: std::chrono...weekday_last(3) 🫢

πŸ“¦ where this page comes from