namespace std::chrono {
class year_month {
chrono::year y_;
chrono::month m_;
public:
year_month() = default;
constexpr year_month(const chrono::year& y, const chrono::month& m) noexcept;
constexpr chrono::year year() const noexcept;
constexpr chrono::month month() const noexcept;
constexpr year_month& operator+=(const months& dm) noexcept;
constexpr year_month& operator-=(const months& dm) noexcept;
constexpr year_month& operator+=(const years& dy) noexcept;
constexpr year_month& operator-=(const years& dy) noexcept;
constexpr bool ok() const noexcept;
};
}
year_month represents a specific month of a specific year,
but with an unspecified day
. year_month is a field-based time point with a resolution of
months. year_month is a trivially copyable and standard-layout class type
.