Namespaces
Variants

std::chrono::year_month_weekday:: year, std::chrono::year_month_weekday:: month, std::chrono::year_month_weekday:: weekday, std::chrono::year_month_weekday:: index, std::chrono::year_month_weekday:: weekday_indexed

From cppreference.net
constexpr std:: chrono :: year year ( ) const noexcept ;
(1) (C++20부터)
constexpr std:: chrono :: month month ( ) const noexcept ;
(2) (C++20부터)
constexpr std:: chrono :: weekday weekday ( ) const noexcept ;
(3) (C++20부터)
constexpr unsigned index ( ) const noexcept ;
(4) (C++20부터)
constexpr std:: chrono :: weekday_indexed weekday_indexed ( ) const noexcept ;
(5) (C++20부터)

year_month_weekday 객체에 저장된 필드 값을 검색합니다.

반환값

1) 저장된 std::chrono::year 값을 반환합니다.
2) 저장된 std::chrono::month 값을 반환합니다.
3) 저장된 std::chrono::weekday 값을 반환합니다.
4) 저장된 요일 인덱스를 반환합니다.
5) weekday ( ) [ index ( ) ]

예제

#include <cassert>
#include <chrono>
int main()
{
    constexpr auto ym{std::chrono::year(2021)/std::chrono::January};
    constexpr auto wdi{std::chrono::Wednesday[1]};
    auto ymwdi{ym/wdi};
    const auto index{ymwdi.index() + 1};
    auto weekday{ymwdi.weekday() + std::chrono::days(1)};
    ymwdi = {ymwdi.year()/ymwdi.month()/weekday[index]};
    // 2021년 1월의 두 번째 목요일
    assert(std::chrono::year_month_day{ymwdi} == std::chrono::January/14/2021);
}