Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::chrono::year_month_day Class Reference

year_month_day More...

#include <year_month_day.h>

Public Member Functions

ETL_CONSTEXPR year_month_day ()
 Default constructor.
ETL_CONSTEXPR14 year_month_day (const etl::chrono::year &y_, const etl::chrono::month &m_, const etl::chrono::day &d_) ETL_NOEXCEPT
 Construct from month and day.
ETL_CONSTEXPR14 year_month_day (const etl::chrono::year_month_day_last &ymdl) ETL_NOEXCEPT
 Construct from year_month_day_last.
ETL_CONSTEXPR14 year_month_day (const etl::chrono::sys_days &sd) ETL_NOEXCEPT
 Construct from sys_days.
ETL_CONSTEXPR14 year_month_day (const etl::chrono::local_days &ld) ETL_NOEXCEPT
 Construct from local_days.
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::year year () const ETL_NOEXCEPT
 Returns the year.
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::month month () const ETL_NOEXCEPT
 Returns the month.
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::day day () const ETL_NOEXCEPT
 Returns the day.
ETL_NODISCARD ETL_CONSTEXPR14 bool ok () const ETL_NOEXCEPT
 Returns true if the year/month/day is valid.
ETL_CONSTEXPR14 etl::chrono::year_month_dayoperator+= (const etl::chrono::years &dy) ETL_NOEXCEPT
ETL_CONSTEXPR14 etl::chrono::year_month_dayoperator+= (const etl::chrono::months &dm) ETL_NOEXCEPT
ETL_CONSTEXPR14 etl::chrono::year_month_dayoperator-= (const etl::chrono::years &dy) ETL_NOEXCEPT
ETL_CONSTEXPR14 etl::chrono::year_month_dayoperator-= (const etl::chrono::months &dm) ETL_NOEXCEPT
ETL_NODISCARD ETL_CONSTEXPR14 int compare (const year_month_day &other) const ETL_NOEXCEPT
ETL_NODISCARD ETL_CONSTEXPR14 operator etl::chrono::sys_days () const ETL_NOEXCEPT
 Converts to etl::chrono::sys_days.
ETL_NODISCARD ETL_CONSTEXPR14 operator etl::chrono::local_days () const ETL_NOEXCEPT
 Converts to etl::chrono::local_days.

Detailed Description

Member Function Documentation

◆ compare()

ETL_NODISCARD ETL_CONSTEXPR14 int etl::chrono::year_month_day::compare ( const year_month_day & other) const
inline

Compare year_month_day with another. if year < other.year, returns -1 else if year > other.year, returns 1 if month < other.month, returns -1 else if month > other.month, returns 1 else if day < other.day, returns -1 else if day > other.day, returns 1 else returns 0


The documentation for this class was generated from the following file: