31#ifndef ETL_IN_CHRONO_H
32 #error DO NOT DIRECTLY INCLUDE THIS FILE. USE CHRONO.H
42 class weekday_indexed;
193 static ETL_CONSTEXPR14
unsigned min() ETL_NOEXCEPT
203 static ETL_CONSTEXPR14
unsigned max() ETL_NOEXCEPT
223 return (value == 0
U) ? 7U : value;
258 return (
wd1.c_encoding() ==
wd2.c_encoding());
275 int delta =
ds.count() % 7;
277 unsigned int value = wd.c_encoding();
314 int diff =
static_cast<int>(
wd1.c_encoding()) -
static_cast<int>(
wd2.c_encoding());
398 ETL_NODISCARD ETL_CONSTEXPR14
unsigned index()
const ETL_NOEXCEPT
407 ETL_NODISCARD ETL_CONSTEXPR14
bool ok()
const ETL_NOEXCEPT
409 return wd.
ok() && (i >= 1U) && (i <= 5U);
423 return (
wd1.weekday() ==
wd2.weekday()) &&
424 (
wd1.index() ==
wd2.index());
479 ETL_NODISCARD ETL_CONSTEXPR14
bool ok()
const ETL_NOEXCEPT
494 return (
wd1.weekday() ==
wd2.weekday());
517#if ETL_USING_8BIT_TYPES
524 const uint8_t* p =
reinterpret_cast<const uint8_t*
>(&value);
526 return etl::private_hash::generic_hash<size_t>(p, p +
sizeof(
unsigned));
534#if ETL_USING_8BIT_TYPES
536 struct hash<
etl::chrono::weekday_indexed>
541 unsigned int b = wdi.
index();
543 uint8_t buffer[
sizeof(a) +
sizeof(b)];
545 memcpy(buffer, &a,
sizeof(a));
546 memcpy(buffer +
sizeof(a), &b,
sizeof(b));
548 return etl::private_hash::generic_hash<size_t>(buffer, buffer +
sizeof(a) +
sizeof(b));
556#if ETL_USING_8BIT_TYPES
558 struct hash<
etl::chrono::weekday_last>
duration
Definition duration.h:108
Definition time_point.h:45
weekday_indexed
Definition weekday.h:344
ETL_NODISCARD ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday weekday() const ETL_NOEXCEPT
Get weekday.
Definition weekday.h:389
ETL_CONSTEXPR14 etl::chrono::weekday_indexed & operator=(const etl::chrono::weekday_indexed &rhs) ETL_NOEXCEPT
Assignment operator.
Definition weekday.h:377
ETL_CONSTEXPR14 weekday_indexed(const etl::chrono::weekday &wd_, unsigned index_) ETL_NOEXCEPT
Construct from weekday and index.
Definition weekday.h:359
ETL_NODISCARD ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Returns true if the weekday and index are valid.
Definition weekday.h:407
ETL_NODISCARD ETL_NODISCARD ETL_CONSTEXPR14 unsigned index() const ETL_NOEXCEPT
Get index.
Definition weekday.h:398
ETL_CONSTEXPR weekday_indexed() ETL_NOEXCEPT
Default constructor.
Definition weekday.h:350
ETL_CONSTEXPR14 weekday_indexed(const etl::chrono::weekday_indexed &other) ETL_NOEXCEPT
Copy constructor.
Definition weekday.h:368
weekday_last
Definition weekday.h:439
ETL_CONSTEXPR14 weekday_last(const etl::chrono::weekday &wd_) ETL_NOEXCEPT
Construct from unsigned.
Definition weekday.h:445
ETL_CONSTEXPR14 weekday_last(const etl::chrono::weekday_last &other) ETL_NOEXCEPT
Copy constructor.
Definition weekday.h:453
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday weekday() const ETL_NOEXCEPT
Get weekday.
Definition weekday.h:471
ETL_CONSTEXPR14 etl::chrono::weekday_last & operator=(const etl::chrono::weekday_last &rhs) ETL_NOEXCEPT
Assignment operator.
Definition weekday.h:461
ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Returns true if the weekday is valid.
Definition weekday.h:479
weekday
Definition weekday.h:54
ETL_NODISCARD ETL_CONSTEXPR14 unsigned iso_encoding() const ETL_NOEXCEPT
Get the ISO encoding of the weekday.
Definition weekday.h:221
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday_indexed operator[](unsigned index) const ETL_NOEXCEPT
Index operator from index.
Definition weekday.h:500
static ETL_NODISCARD ETL_CONSTEXPR14 unsigned max() ETL_NOEXCEPT
Definition weekday.h:203
static ETL_NODISCARD ETL_CONSTEXPR14 unsigned min() ETL_NOEXCEPT
Definition weekday.h:193
ETL_NODISCARD ETL_CONSTEXPR14 bool is_weekend() const ETL_NOEXCEPT
Returns true if the day is a weekend.
Definition weekday.h:242
ETL_NODISCARD ETL_CONSTEXPR14 unsigned c_encoding() const ETL_NOEXCEPT
Get the C encoding of the weekday.
Definition weekday.h:212
ETL_CONSTEXPR weekday() ETL_NOEXCEPT
Default constructor.
Definition weekday.h:60
ETL_CONSTEXPR14 weekday(const etl::chrono::local_days &ld) ETL_NOEXCEPT
Construct from local_days.
Definition weekday.h:89
ETL_CONSTEXPR14 etl::chrono::weekday & operator++() ETL_NOEXCEPT
Pre-increment operator.
Definition weekday.h:118
ETL_CONSTEXPR14 etl::chrono::weekday & operator-=(const etl::chrono::days &ds) ETL_NOEXCEPT
Minus-equals operator subtracting etl::chrono::days.
Definition weekday.h:172
ETL_CONSTEXPR14 weekday(const etl::chrono::weekday &other) ETL_NOEXCEPT
Copy constructor.
Definition weekday.h:100
ETL_CONSTEXPR14 weekday(const etl::chrono::sys_days &sd) ETL_NOEXCEPT
Construct from sys_days.
Definition weekday.h:76
ETL_CONSTEXPR14 etl::chrono::weekday & operator=(const etl::chrono::weekday &rhs) ETL_NOEXCEPT
Assignment operator.
Definition weekday.h:108
ETL_CONSTEXPR14 etl::chrono::weekday & operator+=(const etl::chrono::days &ds) ETL_NOEXCEPT
Plus-equals operator adding etl::chrono::days.
Definition weekday.h:162
ETL_CONSTEXPR14 etl::chrono::weekday & operator--() ETL_NOEXCEPT
Pre-decrement operator.
Definition weekday.h:140
ETL_CONSTEXPR weekday(unsigned value_) ETL_NOEXCEPT
Construct from unsigned.
Definition weekday.h:68
ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Returns true if the weekday is within the valid 1 to 31 range.
Definition weekday.h:183
bitset_ext
Definition absolute.h:38
ETL_NODISCARD ETL_CONSTEXPR14 T round_half_even_unscaled(T value) ETL_NOEXCEPT
Definition scaled_rounding.h:314
Definition last_spec.h:40