UTC date-time breakdown.
More...
#include <tempoch/time.hpp>
|
| | UTC () |
| | Default constructor: J2000 epoch noon-like civil representation.
|
| |
| | UTC (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 UTC | from_c (const tempoch_utc_t &c) |
| | Create from the C FFI struct.
|
| |
|
| int32_t | year |
| | Gregorian year (astronomical year numbering).
|
| |
| uint8_t | month |
| | Month in range [1, 12].
|
| |
| uint8_t | day |
| | Day of month in range [1, 31].
|
| |
| uint8_t | hour |
| | Hour in range [0, 23].
|
| |
| uint8_t | minute |
| | Minute in range [0, 59].
|
| |
| uint8_t | second |
| | Second in range [0, 60], leap second aware.
|
| |
| uint32_t | nanosecond |
| | Nanosecond component in range [0, 999,999,999].
|
| |
UTC date-time breakdown.
A simple value type mirroring the C tempoch_utc_t struct.
static JulianDate from_utc(const UTC &utc)
Create from a UTC date-time.
- Examples
- time_example.cpp.
Definition at line 28 of file time.hpp.
◆ UTC() [1/2]
Default constructor: J2000 epoch noon-like civil representation.
Definition at line 45 of file time.hpp.
Referenced by from_c().
◆ UTC() [2/2]
| tempoch::UTC::UTC |
( |
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 |
|
) |
| |
|
inline |
Construct from civil UTC components.
- Parameters
-
| y | Year. |
| mo | Month [1, 12]. |
| d | Day [1, 31]. |
| h | Hour [0, 23]. |
| mi | Minute [0, 59]. |
| s | Second [0, 60]. |
| ns | Nanoseconds [0, 999,999,999]. |
Definition at line 57 of file time.hpp.
◆ from_c()
| static UTC tempoch::UTC::from_c |
( |
const tempoch_utc_t & |
c | ) |
|
|
inlinestatic |
◆ to_c()
| tempoch_utc_t tempoch::UTC::to_c |
( |
| ) |
const |
|
inline |
◆ day
| uint8_t tempoch::UTC::day |
◆ hour
| uint8_t tempoch::UTC::hour |
◆ minute
| uint8_t tempoch::UTC::minute |
◆ month
| uint8_t tempoch::UTC::month |
◆ nanosecond
| uint32_t tempoch::UTC::nanosecond |
Nanosecond component in range [0, 999,999,999].
Definition at line 42 of file time.hpp.
Referenced by to_c().
◆ second
| uint8_t tempoch::UTC::second |
◆ year
| int32_t tempoch::UTC::year |
The documentation for this struct was generated from the following file: