A timezone offset.
More...
#include <date_time.hpp>
|
int16_t | minutes |
| Offset from UTC+0, in minutes.
|
|
|
TOML_PURE_INLINE_GETTER friend constexpr bool | operator== (time_offset lhs, time_offset rhs) noexcept |
| Equality operator.
|
|
TOML_PURE_INLINE_GETTER friend constexpr bool | operator!= (time_offset lhs, time_offset rhs) noexcept |
| Inequality operator.
|
|
TOML_PURE_INLINE_GETTER friend constexpr bool | operator< (time_offset lhs, time_offset rhs) noexcept |
| Less-than operator.
|
|
TOML_PURE_INLINE_GETTER friend constexpr bool | operator<= (time_offset lhs, time_offset rhs) noexcept |
| Less-than-or-equal-to operator.
|
|
TOML_PURE_INLINE_GETTER friend constexpr bool | operator> (time_offset lhs, time_offset rhs) noexcept |
| Greater-than operator.
|
|
TOML_PURE_INLINE_GETTER friend constexpr bool | operator>= (time_offset lhs, time_offset rhs) noexcept |
| Greater-than-or-equal-to operator.
|
|
std::ostream & | operator<< (std::ostream &lhs, const time_offset &rhs) |
| Prints a time_offset out to a stream as +-HH:MM or Z (per RFC 3339). \detail \cpp std::cout << toml::time_offset{ 2, 30 } << "\n"; std::cout << toml::time_offset{ 2, -30 } << "\n"; std::cout << toml::time_offset{} << "\n"; std::cout << toml::time_offset{ -2, 30 } << "\n"; std::cout << toml::time_offset{ -2, -30 } << "\n"; \ecpp.
|
|
◆ time_offset() [1/2]
Default constructor. Does not initialize the members.
◆ time_offset() [2/2]
Constructs a timezone offset from individual hour and minute totals.
\detail \cpp std::cout << toml::time_offset{ 2, 30 } << "\n"; std::cout << toml::time_offset{ -2, 30 } << "\n"; std::cout << toml::time_offset{ -2, -30 } << "\n"; std::cout << toml::time_offset{ 0, 0 } << "\n"; \ecpp
\out +02:30 -01:30 -02:30 Z \eout
- Template Parameters
-
H | An integral type. |
M | An integral type. |
- Parameters
-
h | The total hours. |
m | The total minutes. |
◆ operator!=
◆ operator<
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
lhs, |
|
|
const time_offset & |
rhs |
|
) |
| |
|
friend |
Prints a time_offset out to a stream as +-HH:MM or Z
(per RFC 3339). \detail \cpp std::cout << toml::time_offset{ 2, 30 } << "\n"; std::cout << toml::time_offset{ 2, -30 } << "\n"; std::cout << toml::time_offset{} << "\n"; std::cout << toml::time_offset{ -2, 30 } << "\n"; std::cout << toml::time_offset{ -2, -30 } << "\n"; \ecpp.
\out +02:30 +01:30 Z -01:30 -02:30 \eout
◆ operator<=
Less-than-or-equal-to operator.
◆ operator==
◆ operator>
◆ operator>=
Greater-than-or-equal-to operator.
◆ minutes
int16_t time_offset::minutes |
Offset from UTC+0, in minutes.
The documentation for this struct was generated from the following file: