[time.cal.year.overview]

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

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

### 30.8.5 Class year [[time.cal.year]](time.cal.year#overview)

#### 30.8.5.1 Overview [time.cal.year.overview]

namespace std::chrono {class year {short y_; // *exposition only*public: year() = default; constexpr explicit year(int y) noexcept; constexpr year& operator++() noexcept; constexpr year operator++(int) noexcept; constexpr year& operator--() noexcept; constexpr year operator--(int) noexcept; constexpr year& operator+=(const years& y) noexcept; constexpr year& operator-=(const years& y) noexcept; constexpr year operator+() const noexcept; constexpr year operator-() const noexcept; constexpr bool is_leap() const noexcept; constexpr explicit operator int() const noexcept; constexpr bool ok() const noexcept; static constexpr year min() noexcept; static constexpr year max() noexcept; };}

[1](#1)

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

year represents a year in the civil calendar[.](#1.sentence-1)

It can represent values in the range [min(), max()][.](#1.sentence-2)

It can be constructed with any int value,
which will be subsequently truncated to fit into year's unspecified internal storage[.](#1.sentence-3)

year 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,
and participates in basic arithmetic with years objects,
which represent a difference between two year objects[.](#1.sentence-4)

[2](#2)

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

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