Embedded Template Library 1.0
Loading...
Searching...
No Matches
hh_mm_ss.h File Reference
#include "../../absolute.h"
#include "../../power.h"

Go to the source code of this file.

Classes

class  etl::chrono::hh_mm_ss< TDuration >
 hh_mm_ss More...

Namespaces

namespace  etl

Functions

template<typename TDuration>
ETL_NODISCARD ETL_CONSTEXPR14 etl::enable_if< etl::is_specialization< TDuration, etl::chrono::duration >::value, TDuration >::type etl::absolute (TDuration dur) ETL_NOEXCEPT
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::chrono::is_am (const etl::chrono::hours &h) ETL_NOEXCEPT
 12/24 hours functions
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::chrono::is_pm (const etl::chrono::hours &h) ETL_NOEXCEPT
 Returns true if h is in the range [12h, 23h] (a pm hour).
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::hours etl::chrono::make12 (const etl::chrono::hours &h) ETL_NOEXCEPT
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::hours etl::chrono::make24 (const etl::chrono::hours &h, bool is_pm) ETL_NOEXCEPT

Function Documentation

◆ is_am()

ETL_NODISCARD ETL_CONSTEXPR14 bool etl::chrono::is_am ( const etl::chrono::hours & h)
inline

12/24 hours functions

Returns true if h is in the range [0h, 11h] (an am hour).

◆ make12()

ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::hours etl::chrono::make12 ( const etl::chrono::hours & h)
inline

Returns the 12-hour equivalent of h in the range [1h, 12h]. If h is not in the range [0h, 23h], the value returned is unspecified.

◆ make24()

ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::hours etl::chrono::make24 ( const etl::chrono::hours & h,
bool is_pm )
inline

Returns the 24-hour equivalent of h, which is assumed to represent the hour with the indicated am/pm. If h is not in the range [1h, 12h], the value returned is unspecified.