chrono_month_weekday_last
chrono_month_weekday_last (월·마지막 요일 타입)
std::chrono::month_weekday_last는 월과 그 월의 마지막 특정 요일을 나타내는 타입이에요.
출처: cppreference
본문
std::chrono::month_weekday_last는 <chrono> 헤더에 정의된 클래스예요. C++20부터 사용 가능해요.
class month_weekday_last;
월과 그 월에서의 weekday_last를 저장해요.
멤버 함수
month()— 월을 반환weekday_last()— 마지막 요일을 반환ok()— 유효한지 확인
예제 (Example)
#include <chrono>
#include <iostream>
int main()
{
using namespace std::chrono;
month_weekday_last mwl = July / Friday[last];
std::cout << unsigned(mwl.month()) << '\n'; // 7
}