Embedded Template Library 1.0
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 (unsigned value_) ETL_NOEXCEPT
 Construct from unsigned.
 
ETL_CONSTEXPR14 year (const etl::chrono::year &other) ETL_NOEXCEPT
 Copy constructor.
 
ETL_CONSTEXPR14 etl::chrono::yearoperator= (const etl::chrono::year &rhs) ETL_NOEXCEPT
 Assignment operator.
 
ETL_CONSTEXPR14 etl::chrono::yearoperator++ () ETL_NOEXCEPT
 Pre-increment operator.
 
ETL_CONSTEXPR14 etl::chrono::year operator++ (int) ETL_NOEXCEPT
 Post-increment operator.
 
ETL_CONSTEXPR14 etl::chrono::yearoperator-- () ETL_NOEXCEPT
 Pre-decrement operator.
 
ETL_CONSTEXPR14 etl::chrono::year operator-- (int) ETL_NOEXCEPT
 Post-decrement operator.
 
ETL_CONSTEXPR14 etl::chrono::yearoperator+= (const etl::chrono::years &ys) ETL_NOEXCEPT
 Plus-equals operator adding etl::chrono::years.
 
ETL_CONSTEXPR14 etl::chrono::yearoperator-= (const etl::chrono::years &ys) ETL_NOEXCEPT
 Minus-equals operator subtracting etl::chrono::years.
 
ETL_NODISCARD ETL_CONSTEXPR14 bool ok () const ETL_NOEXCEPT
 Returns true if the year is within the valid -32767 to 32767 range.
 
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


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