22#include "anch-date-export.hpp"
63 class ANCH_DATE_EXPORT
Date {
68 std::chrono::year_month_day _date;
142 constexpr int32_t
year() const noexcept;
149 constexpr
unsigned month() const noexcept;
156 constexpr
unsigned day() const noexcept;
272 constexpr std::strong_ordering operator<=>(const
Date& other) const noexcept;
281 constexpr
bool operator==(const
Date& other) const noexcept;
295 explicit operator std::chrono::
sys_days() const noexcept;
310 ANCH_DATE_EXPORT std::ostream& operator<<(std::ostream& out, const
anch::
date::
Date&
date);
314#include "date/impl/date.hpp"
Calendar day (RFC 3339 full-date , JSON schema and OpenAPI date format, XSD xs:date ).
Definition date.hpp:63
constexpr Date() noexcept
std::string format() const
int64_t daysUntil(const Date &other) const noexcept
constexpr bool isLeapYear() const noexcept
constexpr unsigned month() const noexcept
unsigned weekday() const noexcept
static Date parse(std::string_view text)
constexpr unsigned day() const noexcept
constexpr operator std::chrono::year_month_day() const noexcept
Date plusMonths(int64_t months) const
Date plusDays(int64_t days) const
Date plusYears(int64_t years) const
constexpr int32_t year() const noexcept
operator std::chrono::sys_days() const noexcept
anch::date::DateTime startOfDay(anch::date::Zone zone=anch::date::Zone::LOCAL) const
anch::date::DateTime at(const anch::date::Time &time, anch::date::Zone zone=anch::date::Zone::LOCAL) const
static Date today(anch::date::Zone zone=anch::date::Zone::LOCAL)
unsigned dayOfYear() const noexcept
Point in time.
Definition dateTime.hpp:89
Time of day with an offset from UTC (RFC 3339 full-time , time format of JSON schema and OpenAPI).
Definition offsetTime.hpp:49
Time of day (RFC 3339 partial-time , SQL TIME , XSD xs:time without time zone).
Definition time.hpp:48
Zone
Time zone of conversions between days and points in time.
Definition date.hpp:42
@ LOCAL
Definition date.hpp:46
@ UTC
Definition date.hpp:44
AnCH framework base namespace.
Definition app.hpp:30