tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
month Struct Reference

The class month represents a month in a year. More...

#include <month.hpp>

Public Member Functions

 month ()=default
 
constexpr month (unsigned m) noexcept
 
constexpr auto ok () const noexcept -> bool
 
constexpr operator unsigned () const noexcept
 
constexpr auto operator++ () noexcept -> month &
 
constexpr auto operator++ (int) noexcept -> month
 
constexpr auto operator+= (months const &m) noexcept -> month &
 
constexpr auto operator-- () noexcept -> month &
 
constexpr auto operator-- (int) noexcept -> month
 
constexpr auto operator-= (months const &m) noexcept -> month &
 

Detailed Description

The class month represents a month in a year.

Its normal range is [1, 12], but it may hold any number in [​0​, 255]. Twelve named constants are predefined in the etl::chrono namespace for the twelve months of the year.

Constructor & Destructor Documentation

◆ month() [1/2]

month ( )
default

◆ month() [2/2]

month ( unsigned m)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ ok()

auto ok ( ) const -> bool
inlinenodiscardconstexprnoexcept

◆ operator unsigned()

operator unsigned ( ) const
inlineexplicitconstexprnoexcept

◆ operator++() [1/2]

auto operator++ ( ) -> month&
constexprnoexcept

◆ operator++() [2/2]

auto operator++ ( int ) -> month
constexprnoexcept

◆ operator+=()

auto operator+= ( months const & m) -> month&
constexprnoexcept

◆ operator--() [1/2]

auto operator-- ( ) -> month&
constexprnoexcept

◆ operator--() [2/2]

auto operator-- ( int ) -> month
constexprnoexcept

◆ operator-=()

auto operator-= ( months const & m) -> month&
constexprnoexcept

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