[time.cal.ymdlast.overview]

# 30 Time library [[time]](./#time)

## 30.8 The civil calendar [[time.cal]](time.cal#ymdlast.overview)

### 30.8.15 Class year_month_day_last [[time.cal.ymdlast]](time.cal.ymdlast#overview)

#### 30.8.15.1 Overview [time.cal.ymdlast.overview]

namespace std::chrono {class year_month_day_last { chrono::year y_; // *exposition only* chrono::month_day_last mdl_; // *exposition only*public:constexpr year_month_day_last(const chrono::year& y, const chrono::month_day_last& mdl) noexcept; constexpr year_month_day_last& operator+=(const months& m) noexcept; constexpr year_month_day_last& operator-=(const months& m) noexcept; constexpr year_month_day_last& operator+=(const years& y) noexcept; constexpr year_month_day_last& operator-=(const years& y) noexcept; constexpr chrono::year year() const noexcept; constexpr chrono::month month() const noexcept; constexpr chrono::month_day_last month_day_last() const noexcept; constexpr chrono::day day() const noexcept; constexpr operator sys_days() const noexcept; constexpr explicit operator local_days() const noexcept; constexpr bool ok() const noexcept; };}

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L6823)

year_month_day_last represents the last day of a specific year and month[.](#1.sentence-1)

year_month_day_last is a field-based time point with a resolution of days,
except that it is restricted to pointing to the last day of a year and month[.](#1.sentence-2)

[*Note [1](#note-1)*:

year_month_day_last supports years- and months-oriented arithmetic,
but not days-oriented arithmetic[.](#1.sentence-3)

For the latter, there is a conversion to sys_days,
which efficiently supports days-oriented arithmetic[.](#1.sentence-4)

â *end note*]

year_month_day_last meets the [*Cpp17EqualityComparable*](utility.arg.requirements#:Cpp17EqualityComparable "16.4.4.2 Template argument requirements [utility.arg.requirements]") (Table [28](utility.arg.requirements#tab:cpp17.equalitycomparable "Table 28: Cpp17EqualityComparable requirements"))
and [*Cpp17LessThanComparable*](utility.arg.requirements#:Cpp17LessThanComparable "16.4.4.2 Template argument requirements [utility.arg.requirements]") (Table [29](utility.arg.requirements#tab:cpp17.lessthancomparable "Table 29: Cpp17LessThanComparable requirements")) requirements[.](#1.sentence-5)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L6836)

year_month_day_last is a trivially copyable and standard-layout class type[.](#2.sentence-1)
