NeBuild dev
|
A date-time. More...
#include <date_time.hpp>
Public Member Functions | |
TOML_NODISCARD_CTOR | date_time () noexcept=default |
Default constructor. Does not initialize the members. | |
TOML_NODISCARD_CTOR constexpr | date_time (const toml::date &d, const toml::time &t) noexcept |
Constructs a local date-time. | |
TOML_NODISCARD_CTOR constexpr | date_time (const toml::date &d) noexcept |
Constructs a local date-time. | |
TOML_NODISCARD_CTOR constexpr | date_time (const toml::time &t) noexcept |
Constructs a local date-time. | |
TOML_NODISCARD_CTOR constexpr | date_time (const toml::date &d, const toml::time &t, const toml::time_offset &off) noexcept |
Constructs an offset date-time. | |
TOML_PURE_INLINE_GETTER constexpr bool | is_local () const noexcept |
Returns true if this date_time does not contain timezone offset information. | |
Public Attributes | |
toml::date | date |
The date component. | |
toml::time | time |
The time component. | |
optional< toml::time_offset > | offset |
The timezone offset component. | |
Friends | |
TOML_PURE_GETTER friend constexpr bool | operator== (const date_time &lhs, const date_time &rhs) noexcept |
Equality operator. | |
TOML_PURE_INLINE_GETTER friend constexpr bool | operator!= (const date_time &lhs, const date_time &rhs) noexcept |
Inequality operator. | |
TOML_PURE_GETTER friend constexpr bool | operator< (const date_time &lhs, const date_time &rhs) noexcept |
Less-than operator. | |
TOML_PURE_GETTER friend constexpr bool | operator<= (const date_time &lhs, const date_time &rhs) noexcept |
Less-than-or-equal-to operator. | |
TOML_PURE_INLINE_GETTER friend constexpr bool | operator> (const date_time &lhs, const date_time &rhs) noexcept |
Greater-than operator. | |
TOML_PURE_INLINE_GETTER friend constexpr bool | operator>= (const date_time &lhs, const date_time &rhs) noexcept |
Greater-than-or-equal-to operator. | |
std::ostream & | operator<< (std::ostream &lhs, const date_time &rhs) |
Prints a date_time out to a stream in RFC 3339 format. \detail \cpp std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 } } << "\n"; std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, { -2, -30 } } << "\n"; std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, {} } << "\n"; \ecpp. | |
A date-time.
|
defaultnoexcept |
Default constructor. Does not initialize the members.
|
inlineconstexprnoexcept |
Constructs a local date-time.
d | The date component. |
t | The time component. |
|
inlineexplicitconstexprnoexcept |
Constructs a local date-time.
d | The date component. |
|
inlineexplicitconstexprnoexcept |
Constructs a local date-time.
t | The time component. |
|
inlineconstexprnoexcept |
Constructs an offset date-time.
d | The date component. |
t | The time component. |
off | The timezone offset. |
|
inlineconstexprnoexcept |
Returns true if this date_time does not contain timezone offset information.
|
friend |
Inequality operator.
|
friend |
Less-than operator.
|
friend |
Prints a date_time out to a stream in RFC 3339 format. \detail \cpp std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 } } << "\n"; std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, { -2, -30 } } << "\n"; std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, {} } << "\n"; \ecpp.
\out 1987-03-16T10:20:34 1987-03-16T10:20:34-02:30 1987-03-16T10:20:34Z \eout
|
friend |
Less-than-or-equal-to operator.
|
friend |
Equality operator.
|
friend |
Greater-than operator.
|
friend |
Greater-than-or-equal-to operator.
toml::date date_time::date |
The date component.
optional<toml::time_offset> date_time::offset |
The timezone offset component.
toml::time date_time::time |
The time component.