Namespaces
Variants

std::chrono::year_month_weekday:: year_month_weekday

From cppreference.net
year_month_weekday ( ) = default ;
(1) (C++20부터)
constexpr year_month_weekday ( const std:: chrono :: year & y,

const std:: chrono :: month & m,

const std:: chrono :: weekday_indexed & wdi ) noexcept ;
(2) (C++20부터)
constexpr year_month_weekday ( const std:: chrono :: sys_days & dp ) noexcept ;
(3) (C++20부터)
constexpr explicit year_month_weekday ( const std:: chrono :: local_days & dp ) noexcept ;
(4) (C++20부터)

year_month_weekday 객체를 생성합니다.

1) 기본 생성자는 필드들을 초기화하지 않은 상태로 둡니다.
2) 연도 y , 월 m , 요일 wdi. weekday ( ) 및 요일 인덱스 wdi. index ( ) 를 저장하는 year_month_weekday 객체를 생성합니다.
3) dp 가 나타내는 날짜에 해당하는 year_month_weekday 객체를 생성합니다. 유효한 날짜를 저장하는 모든 year_month_weekday 객체에 대해, 이를 sys_days 로 변환한 후 다시 되돌리면 동일한 값을 얻습니다. 이 생성자는 sys_days 에서 year_month_weekday 로의 암시적 변환을 정의합니다.
4) year_month_weekday 객체를 dp 가 나타내는 날짜에 해당하도록 생성합니다. year_month_weekday ( sys_days ( dp. time_since_epoch ( ) ) ) 와 동일합니다.

참고 사항

year_month_weekday 는 부분 날짜 유형인 std::chrono::year_month std::chrono::month_weekday 중 하나를 누락된 구성 요소(각각 인덱스된 평일과 연도)와 결합하여 operator/ 를 사용해 생성할 수도 있습니다.

참고 항목

(C++20)
그레고리력 날짜 생성을 위한 관용적 구문
(함수)