Namespaces
Variants

std::chrono::month_weekday_last:: month, std::chrono::month_weekday_last:: weekday_last

From cppreference.net
constexpr std:: chrono :: month month ( ) const noexcept ;
(1) (C++20以降)
constexpr std:: chrono :: weekday_last weekday_last ( ) const noexcept ;
(2) (C++20以降)

* this に格納されている month および weekday_last オブジェクトのコピーを取得します。

戻り値

1) 格納されている std::chrono::month オブジェクトのコピー * this
2) 格納されている std::chrono::weekday_last オブジェクトのコピー * this

#include <chrono>
#include <iostream>
using namespace std::chrono;
int main()
{
    std::cout << std::boolalpha;
    auto mwdl{March/Friday[last]}; // 3月の最終金曜日
    auto ywdl{year(2024)/mwdl};
    std::cout << (year_month_day{ywdl} == 
                  year_month_day{March/29/2024}) << ' ';
    // 2024年の翌月の最終金曜日
    mwdl = {(mwdl.month() + months(1))/mwdl.weekday_last()};
    ywdl = {year(2024)/mwdl}; 
    std::cout << (year_month_day{ywdl} == 
                  year_month_day{April/26/2024}) << '\n';
}

出力:

true true