|
tempoch-cpp 0.5.3
Header-only C++ wrapper for tempoch
|
UTC date-time breakdown. More...
#include <tempoch/civil_time.hpp>
Public Member Functions | |
| CivilTime () | |
| Default constructor: J2000 epoch noon-like civil representation. | |
| CivilTime (int32_t y, uint8_t mo, uint8_t d, uint8_t h=0, uint8_t mi=0, uint8_t s=0, uint32_t ns=0) | |
| Construct from civil UTC components. | |
| tempoch_utc_t | to_c () const |
| Convert to the C FFI struct. | |
Static Public Member Functions | |
| static CivilTime | from_c (const tempoch_utc_t &c) |
| Create from the C FFI struct. | |
Public Attributes | |
| int32_t | year |
| Gregorian year (astronomical year numbering). | |
| uint8_t | month |
| Month [1, 12]. | |
| uint8_t | day |
| Day of month [1, 31]. | |
| uint8_t | hour |
| Hour [0, 23]. | |
| uint8_t | minute |
| Minute [0, 59]. | |
| uint8_t | second |
| Second [0, 60] (60 only during a positive leap second). | |
| uint32_t | nanosecond |
| Nanosecond [0, 999 999 999]. | |
UTC date-time breakdown.
A simple value type mirroring the C tempoch_utc_t struct.
Definition at line 28 of file civil_time.hpp.
|
inline |
Default constructor: J2000 epoch noon-like civil representation.
Definition at line 38 of file civil_time.hpp.
Referenced by from_c().
|
inline |
Construct from civil UTC components.
Definition at line 43 of file civil_time.hpp.
|
inlinestatic |
Create from the C FFI struct.
Definition at line 51 of file civil_time.hpp.
References CivilTime().
Referenced by tempoch::detail::time_to_civil().
|
inline |
Convert to the C FFI struct.
Definition at line 48 of file civil_time.hpp.
References day, hour, minute, month, nanosecond, second, and year.
| uint8_t tempoch::CivilTime::day |
Day of month [1, 31].
Definition at line 31 of file civil_time.hpp.
Referenced by tempoch::operator<<(), and to_c().
| uint8_t tempoch::CivilTime::hour |
Hour [0, 23].
Definition at line 32 of file civil_time.hpp.
Referenced by tempoch::operator<<(), and to_c().
| uint8_t tempoch::CivilTime::minute |
Minute [0, 59].
Definition at line 33 of file civil_time.hpp.
Referenced by tempoch::operator<<(), and to_c().
| uint8_t tempoch::CivilTime::month |
Month [1, 12].
Definition at line 30 of file civil_time.hpp.
Referenced by tempoch::operator<<(), and to_c().
| uint32_t tempoch::CivilTime::nanosecond |
Nanosecond [0, 999 999 999].
Definition at line 35 of file civil_time.hpp.
Referenced by tempoch::operator<<(), and to_c().
| uint8_t tempoch::CivilTime::second |
Second [0, 60] (60 only during a positive leap second).
Definition at line 34 of file civil_time.hpp.
Referenced by tempoch::operator<<(), and to_c().
| int32_t tempoch::CivilTime::year |
Gregorian year (astronomical year numbering).
Definition at line 29 of file civil_time.hpp.
Referenced by tempoch::operator<<(), and to_c().