struct
time_offsetA timezone offset.
Constructors, destructors, conversion operators
- time_offset() constexpr noexcept
- Default-constructs a zero time-offset.
- time_offset(int8_t h, int8_t m) constexpr noexcept
- Constructs a timezone offset from separate hour and minute totals.
Public variables
Friends
-
auto operator!=(time_
offset lhs, time_ offset rhs) → bool constexpr noexcept - Inequality operator.
-
auto operator<(time_
offset lhs, time_ offset rhs) → bool constexpr noexcept - Less-than operator.
-
auto operator<=(time_
offset lhs, time_ offset rhs) → bool constexpr noexcept - Less-than-or-equal-to operator.
-
auto operator==(time_
offset lhs, time_ offset rhs) → bool constexpr noexcept - Equality operator.
-
auto operator>(time_
offset lhs, time_ offset rhs) → bool constexpr noexcept - Greater-than operator.
-
auto operator>=(time_
offset lhs, time_ offset rhs) → bool constexpr noexcept - Greater-than-or-equal-to operator.
Function documentation
toml:: time_offset:: time_offset(int8_t h,
int8_t m) constexpr noexcept
Constructs a timezone offset from separate hour and minute totals.
Parameters | |
---|---|
h | The total hours. |
m | The total minutes. |
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";
+02:30 -01:30 -02:30 Z