std::chrono::year_month_day_last::year, std::chrono::year_month_day_last::month, std::chrono::year_month_day_last::day, std::chrono::year_month_day_last::month_day_last

From cppreference.com
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)
 
 
 
constexpr std::chrono::year year() const noexcept;
(1) (since C++20)
constexpr std::chrono::month month() const noexcept;
(2) (since C++20)
constexpr std::chrono::day day() const noexcept;
(3) (since C++20)
constexpr std::chrono::month_day_last month_day_last() const noexcept;
(4) (since C++20)

Retrieves the field values stored in this year_month_day_last object.

Return values

1) Returns the stored std::chrono::year value.
2) Returns the stored std::chrono::month value.
3) A std::chrono::day value corresponding to the last day of the stored year and month. If this->ok() is false, the return value is unspecified.
4) A std::chrono::month_day_last constructed from month().

Example

#include <iostream>
#include <chrono>
 
int main()
{
    std::cout << std::boolalpha;
 
    constexpr auto ymdl {std::chrono::last/11/2020};
    std::cout << (ymdl.day() == std::chrono::day(30)) << ' '
              << (ymdl.month() == std::chrono::November) << ' '
              << (ymdl.year() == std::chrono::year(2020)) << ' ';
    constexpr auto mdl = ymdl.month_day_last();
    std::cout << (mdl == (std::chrono::November/std::chrono::last)) << '\n';
}

Output:

true true true true