25 Time library [time]

25.8 The civil calendar [time.cal]

25.8.17 Class year_­month_­weekday_­last [time.cal.ymwdlast]

25.8.17.1 Overview [time.cal.ymwdlast.overview]

namespace std::chrono {
  class year_month_weekday_last {
    chrono::year         y_;    // exposition only
    chrono::month        m_;    // exposition only
    chrono::weekday_last wdl_;  // exposition only

  public:
    constexpr year_month_weekday_last(const chrono::year& y, const chrono::month& m,
                                      const chrono::weekday_last& wdl) noexcept;

    constexpr year_month_weekday_last& operator+=(const months& m) noexcept;
    constexpr year_month_weekday_last& operator-=(const months& m) noexcept;
    constexpr year_month_weekday_last& operator+=(const years& y)  noexcept;
    constexpr year_month_weekday_last& operator-=(const years& y)  noexcept;

    constexpr chrono::year         year()         const noexcept;
    constexpr chrono::month        month()        const noexcept;
    constexpr chrono::weekday      weekday()      const noexcept;
    constexpr chrono::weekday_last weekday_last() const noexcept;

    constexpr          operator sys_days()   const noexcept;
    explicit constexpr operator local_days() const noexcept;
    constexpr bool ok() const noexcept;
  };
}
year_­month_­weekday_­last represents a specific year, month, and last weekday of the month.
year_­month_­weekday_­last is a field-based time point with a resolution of days, except that it is restricted to pointing to the last weekday of a year and month.
[Note
:
year_­month_­weekday_­last supports years- and months-oriented arithmetic, but not days-oriented arithmetic.
For the latter, there is a conversion to sys_­days, which efficiently supports days-oriented arithmetic.
end note
]
year_­month_­weekday_­last is Cpp17EqualityComparable (Table 22).