Loading...
Searching...
No Matches
etl::chrono::year Class Reference

year More...

`#include <year.h>`

## Public Types

using | rep = int16_t

## Public Member Functions

ETL_CONSTEXPR | year () ETL_NOEXCEPT
| Default constructor.
ETL_CONSTEXPR | year (int value_) ETL_NOEXCEPT
| Construct from int.
ETL_CONSTEXPR14 etl::chrono::year & | operator++ () ETL_NOEXCEPT
| Pre-increment operator.
ETL_CONSTEXPR14 etl::chrono::year | operator++ (int) ETL_NOEXCEPT
| Post-increment operator.
ETL_CONSTEXPR14 etl::chrono::year & | operator-- () ETL_NOEXCEPT
| Pre-decrement operator.
ETL_CONSTEXPR14 etl::chrono::year | operator-- (int) ETL_NOEXCEPT
| Post-decrement operator.
ETL_CONSTEXPR14 etl::chrono::year & | operator+= (const etl::chrono::years &ys) ETL_NOEXCEPT
| Plus-equals operator adding etl::chrono::years.
ETL_CONSTEXPR14 etl::chrono::year & | operator-= (const etl::chrono::years &ys) ETL_NOEXCEPT
| Minus-equals operator subtracting etl::chrono::years.
ETL_NODISCARD ETL_CONSTEXPR14 bool | ok () const ETL_NOEXCEPT
ETL_NODISCARD ETL_CONSTEXPR14 bool | is_leap () const ETL_NOEXCEPT
| Returns true if the year is a leap year.
ETL_CONSTEXPR14 | operator int () const ETL_NOEXCEPT
| Conversion operator to unsigned int.
ETL_NODISCARD ETL_CONSTEXPR14 int | compare (const year &other) const ETL_NOEXCEPT

## Static Public Member Functions

static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::year | min () ETL_NOEXCEPT
| The minimum year value for which ok() will return true.
static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::year | max () ETL_NOEXCEPT
| The maximum year value for which ok() will return true.

## Detailed Description

year

## Member Function Documentation

## compare()

ETL_NODISCARD ETL_CONSTEXPR14 int etl::chrono::year::compare | ( | const year & | other | ) | const

inline

Compare year with another. if year < other, returns -1 else if year > other, returns 1 else returns 0

## ok()

ETL_NODISCARD ETL_CONSTEXPR14 bool etl::chrono::year::ok | ( |  | ) | const

inline

Returns true if the year is within the valid -32767 to 32767 range

The documentation for this class was generated from the following file:

- include/etl/private/chrono/year.h