4#ifndef TETL_CHRONO_YEAR_MONTH_WEEKDAY_HPP
5#define TETL_CHRONO_YEAR_MONTH_WEEKDAY_HPP
7#include <etl/_chrono/local_t.hpp>
8#include <etl/_chrono/month.hpp>
9#include <etl/_chrono/system_clock.hpp>
10#include <etl/_chrono/weekday.hpp>
11#include <etl/_chrono/weekday_indexed.hpp>
12#include <etl/_chrono/year.hpp>
68 auto firstOfMonth =
chrono::
weekday(
static_cast<sys_days>(_y / _m / 1));
69 auto d2 = _wdi
.weekday() - firstOfMonth + days(
static_cast<int_least32_t>(((_wdi
.index() - 1) * 7) + 1));
72 return static_cast<
unsigned>(d2.count()) <=
static_cast<
unsigned>((_y / _m /
last).day());
91 auto const ym = year_month{lhs.year(), lhs.month()} + rhs;
constexpr auto last
Definition last_spec.hpp:26
constexpr auto operator-(year_month_weekday const &lhs, months const &rhs) noexcept -> year_month_weekday
Definition year_month_weekday.hpp:100
constexpr auto operator-(year_month_weekday const &lhs, years const &rhs) noexcept -> year_month_weekday
Definition year_month_weekday.hpp:115
constexpr auto operator==(year_month_weekday const &lhs, year_month_weekday const &rhs) noexcept -> bool
Definition year_month_weekday.hpp:84
constexpr auto operator+(years const &lhs, year_month_weekday const &rhs) noexcept -> year_month_weekday
Definition year_month_weekday.hpp:110
constexpr auto operator+(months const &lhs, year_month_weekday const &rhs) noexcept -> year_month_weekday
Definition year_month_weekday.hpp:95
constexpr auto operator==(month lhs, month rhs) noexcept -> bool
Definition month.hpp:53
constexpr auto operator+(year_month_weekday const &lhs, years const &rhs) noexcept -> year_month_weekday
Definition year_month_weekday.hpp:105
constexpr auto operator+(year const &lhs, years const &rhs) noexcept -> year
Definition year.hpp:120
constexpr auto operator+(year_month_weekday const &lhs, months const &rhs) noexcept -> year_month_weekday
Definition year_month_weekday.hpp:89
Definition adjacent_find.hpp:9
constexpr auto operator-() const -> etl::common_type_t< duration >
Implements unary plus and unary minus for the durations.
Definition duration.hpp:128
The class month represents a month in a year.
Definition month.hpp:22
constexpr auto ok() const noexcept -> bool
Definition month.hpp:31
Definition weekday_indexed.hpp:12
constexpr auto index() const noexcept -> unsigned
Definition weekday_indexed.hpp:26
constexpr auto weekday() const noexcept -> etl::chrono::weekday
Definition weekday_indexed.hpp:21
friend constexpr auto operator==(weekday_indexed const &lhs, weekday_indexed const &rhs) noexcept -> bool
Definition weekday_indexed.hpp:36
Definition weekday.hpp:19
constexpr auto ok() const noexcept -> bool
Definition weekday.hpp:81
Definition year_month_weekday.hpp:17
constexpr auto index() const noexcept -> unsigned
Definition year_month_weekday.hpp:51
constexpr year_month_weekday(chrono::year const &y, chrono::month const &m, chrono::weekday_indexed const &wdi) noexcept
Definition year_month_weekday.hpp:20
constexpr auto ok() const noexcept -> bool
Definition year_month_weekday.hpp:60
constexpr auto weekday_indexed() const noexcept -> chrono::weekday_indexed
Definition year_month_weekday.hpp:55
constexpr auto month() const noexcept -> chrono::month
Definition year_month_weekday.hpp:43
constexpr auto weekday() const noexcept -> chrono::weekday
Definition year_month_weekday.hpp:47
constexpr auto operator-=(months const &m) noexcept -> year_month_weekday &
constexpr year_month_weekday(sys_days const &dp) noexcept
constexpr auto operator-=(years const &y) noexcept -> year_month_weekday &
year_month_weekday()=default
constexpr auto year() const noexcept -> chrono::year
Definition year_month_weekday.hpp:39
constexpr year_month_weekday(local_days const &dp) noexcept
constexpr auto operator+=(years const &y) noexcept -> year_month_weekday &
constexpr operator sys_days() const noexcept
constexpr auto operator+=(months const &m) noexcept -> year_month_weekday &
constexpr auto ok() const noexcept -> bool
Definition year.hpp:76
friend constexpr auto operator==(year lhs, year rhs) noexcept -> bool
Definition year.hpp:91