31#ifndef ETL_IN_CHRONO_H
32 #error DO NOT DIRECTLY INCLUDE THIS FILE. USE CHRONO.H
51 ETL_CONSTEXPR
year() ETL_NOEXCEPT
59 ETL_CONSTEXPR
explicit year(
int value_) ETL_NOEXCEPT
130 ETL_NODISCARD ETL_CONSTEXPR14
bool ok() const ETL_NOEXCEPT
156 ETL_NODISCARD ETL_CONSTEXPR14
bool is_leap() const ETL_NOEXCEPT
158 return ((value % 4) == 0) &&
159 (((value % 100) != 0) ||
160 ((value % 400) == 0));
166 ETL_CONSTEXPR14
operator int() const ETL_NOEXCEPT
177 ETL_NODISCARD ETL_CONSTEXPR14
int compare(
const year& other)
const ETL_NOEXCEPT
179 if (value < other.value)
181 if (value > other.value)
197 return (
static_cast<int>(y1) ==
static_cast<int>(y2));
213 return (
static_cast<int>(y1) <
static_cast<int>(y2));
221 return (
static_cast<int>(y1) <=
static_cast<int>(y2));
229 return (
static_cast<int>(y1) >
static_cast<int>(y2));
237 return (
static_cast<int>(y1) >=
static_cast<int>(y2));
247 return (
static_cast<int>(y1) <=>
static_cast<int>(y2));
296 return etl::chrono::years(
static_cast<int>(y1) -
static_cast<int>(y2));
303#if ETL_USING_8BIT_TYPES
305 struct hash<
etl::chrono::year>
309 etl::chrono::year::rep value =
static_cast<etl::chrono::year::rep
>(
static_cast<int>(y));
310 const uint8_t* p =
reinterpret_cast<const uint8_t*
>(&value);
312 return etl::private_hash::generic_hash<size_t>(p, p +
sizeof(value));
318#if ETL_HAS_CHRONO_LITERALS_YEAR
321 inline namespace literals
323 inline namespace chrono_literals
328 #if ETL_USING_VERBOSE_CHRONO_LITERALS
329 inline ETL_CONSTEXPR14 etl::chrono::year
operator""_year(
unsigned long long y) ETL_NOEXCEPT
331 inline ETL_CONSTEXPR14 etl::chrono::year
operator""_y(
unsigned long long y) ETL_NOEXCEPT
334 return etl::chrono::year(
static_cast<int>(y));
ETL_CONSTEXPR14 etl::chrono::year operator--(int) ETL_NOEXCEPT
Post-decrement operator.
Definition year.h:98
ETL_NODISCARD ETL_CONSTEXPR14 bool is_leap() const ETL_NOEXCEPT
Returns true if the year is a leap year.
Definition year.h:156
ETL_CONSTEXPR year() ETL_NOEXCEPT
Default constructor.
Definition year.h:51
ETL_CONSTEXPR14 etl::chrono::year & operator--() ETL_NOEXCEPT
Pre-decrement operator.
Definition year.h:88
ETL_CONSTEXPR year(int value_) ETL_NOEXCEPT
Construct from int.
Definition year.h:59
ETL_CONSTEXPR14 etl::chrono::year & operator++() ETL_NOEXCEPT
Pre-increment operator.
Definition year.h:67
ETL_CONSTEXPR14 etl::chrono::year & operator-=(const etl::chrono::years &ys) ETL_NOEXCEPT
Minus-equals operator subtracting etl::chrono::years.
Definition year.h:119
static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::year min() ETL_NOEXCEPT
The minimum year value for which ok() will return true.
Definition year.h:139
ETL_CONSTEXPR14 etl::chrono::year & operator+=(const etl::chrono::years &ys) ETL_NOEXCEPT
Plus-equals operator adding etl::chrono::years.
Definition year.h:109
ETL_NODISCARD ETL_CONSTEXPR14 int compare(const year &other) const ETL_NOEXCEPT
Definition year.h:177
ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Definition year.h:130
static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::year max() ETL_NOEXCEPT
The maximum year value for which ok() will return true.
Definition year.h:148
ETL_CONSTEXPR14 etl::chrono::year operator++(int) ETL_NOEXCEPT
Post-increment operator.
Definition year.h:77
ETL_CONSTEXPR14 etl::chrono::day operator+(const etl::chrono::day &d, const etl::chrono::days &ds) ETL_NOEXCEPT
Spaceship operator.
Definition day.h:226
ETL_CONSTEXPR14 etl::chrono::day operator-(const etl::chrono::day &d, const etl::chrono::days &ds) ETL_NOEXCEPT
Definition day.h:252
ETL_CONSTEXPR14 bool operator<(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Less-than operator.
Definition day.h:182
ETL_CONSTEXPR14 bool operator>=(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Greater-than-or-equal operator.
Definition day.h:206
ETL_CONSTEXPR14 bool operator==(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Equality operator.
Definition day.h:166
ETL_CONSTEXPR14 bool operator<=(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Less-than-or-equal operator.
Definition day.h:190
ETL_CONSTEXPR14 bool operator!=(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Inequality operator.
Definition day.h:174
ETL_CONSTEXPR14 bool operator>(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Greater-than operator.
Definition day.h:198
Definition integral_limits.h:518
bitset_ext
Definition absolute.h:40