31#ifndef ETL_IN_CHRONO_H
32 #error DO NOT DIRECTLY INCLUDE THIS FILE. USE CHRONO.H
45 namespace private_chrono
47 static ETL_CONSTANT
unsigned char days_in_month[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
62 ETL_CONSTEXPR
month() ETL_NOEXCEPT
163 return (value >= 1U) && (value <= 12U);
175 if (value <
other.value)
return -1;
176 if (value >
other.value)
return 1;
204 return static_cast<unsigned>(value);
217 return (
static_cast<unsigned>(
d1) ==
static_cast<unsigned>(
d2));
233 return (
static_cast<unsigned>(
d1) <
static_cast<unsigned>(
d2));
241 return (
static_cast<unsigned>(
d1) <=
static_cast<unsigned>(
d2));
249 return (
static_cast<unsigned>(
d1) >
static_cast<unsigned>(
d2));
257 return (
static_cast<unsigned>(
d1) >=
static_cast<unsigned>(
d2));
266 return (
static_cast<unsigned>(
d1) <=>
static_cast<unsigned>(
d2));
276 unsigned int value =
static_cast<unsigned int>(m);
285 int delta =
ms.count() % 12;
320 if (m1.ok() && m2.ok())
323 int difference =
static_cast<int>(
static_cast<unsigned>(m1)) -
static_cast<int>(
static_cast<unsigned>(m2));
375#if ETL_USING_8BIT_TYPES
377 struct hash<
etl::chrono::month>
381 etl::chrono::month::rep value =
static_cast<etl::chrono::month::rep
>(
static_cast<unsigned>(m));
382 const uint8_t* p =
reinterpret_cast<const uint8_t*
>(&value);
384 return etl::private_hash::generic_hash<size_t>(p, p +
sizeof(value));
duration
Definition duration.h:108
month
Definition month.h:54
ETL_CONSTEXPR month() ETL_NOEXCEPT
Default constructor.
Definition month.h:62
ETL_CONSTEXPR14 etl::chrono::month & operator--() ETL_NOEXCEPT
Pre-decrement operator.
Definition month.h:118
static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::month max() ETL_NOEXCEPT
The maximum month value for which ok() will return true
Definition month.h:194
ETL_CONSTEXPR14 etl::chrono::month & operator++() ETL_NOEXCEPT
Pre-increment operator.
Definition month.h:96
ETL_CONSTEXPR14 etl::chrono::month & operator=(const etl::chrono::month &rhs) ETL_NOEXCEPT
Assignment operator.
Definition month.h:86
ETL_CONSTEXPR14 etl::chrono::month & operator+=(const etl::chrono::months &ms) ETL_NOEXCEPT
Plus-equals operator adding etl::chrono::months.
Definition month.h:140
static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::month min() ETL_NOEXCEPT
The minimum month value for which ok() will return true
Definition month.h:185
ETL_CONSTEXPR14 month(const etl::chrono::month &other) ETL_NOEXCEPT
Copy constructor.
Definition month.h:78
ETL_CONSTEXPR month(unsigned value_) ETL_NOEXCEPT
Construct from unsigned.
Definition month.h:70
ETL_CONSTEXPR14 etl::chrono::month & operator-=(const etl::chrono::months &ms) ETL_NOEXCEPT
Minus-equals operator subtracting etl::chrono::months.
Definition month.h:150
ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Returns true if the month is within the valid 1 to 31 range.
Definition month.h:161
ETL_NODISCARD ETL_CONSTEXPR14 int compare(const month &other) const ETL_NOEXCEPT
Definition month.h:173
bitset_ext
Definition absolute.h:38
ETL_NODISCARD ETL_CONSTEXPR14 T round_half_even_unscaled(T value) ETL_NOEXCEPT
Definition scaled_rounding.h:314