Modified Julian Date wrapper (value type).
More...
#include <tempoch/time.hpp>
Modified Julian Date wrapper (value type).
Wraps a raw double MJD value and provides conversions to/from UTC, JD, and arithmetic operations.
auto mjd2 = mjd + 1.0;
JulianDate to_jd() const
Convert to JD.
static MJD from_utc(const UTC &utc)
Create from a UTC date-time.
Definition at line 158 of file time.hpp.
◆ MJD() [1/2]
| constexpr tempoch::MJD::MJD |
( |
| ) |
|
|
inlineconstexpr |
◆ MJD() [2/2]
| constexpr tempoch::MJD::MJD |
( |
double |
v | ) |
|
|
inlineexplicitconstexpr |
◆ from_jd()
◆ from_utc()
| static MJD tempoch::MJD::from_utc |
( |
const UTC & |
utc | ) |
|
|
inlinestatic |
◆ operator!=()
| bool tempoch::MJD::operator!= |
( |
const MJD & |
o | ) |
const |
|
inline |
◆ operator+()
| MJD tempoch::MJD::operator+ |
( |
double |
days | ) |
const |
|
inline |
◆ operator-()
| double tempoch::MJD::operator- |
( |
const MJD & |
other | ) |
const |
|
inline |
Difference in days (this – other).
Definition at line 192 of file time.hpp.
◆ operator<()
| bool tempoch::MJD::operator< |
( |
const MJD & |
o | ) |
const |
|
inline |
◆ operator<=()
| bool tempoch::MJD::operator<= |
( |
const MJD & |
o | ) |
const |
|
inline |
◆ operator==()
| bool tempoch::MJD::operator== |
( |
const MJD & |
o | ) |
const |
|
inline |
◆ operator>()
| bool tempoch::MJD::operator> |
( |
const MJD & |
o | ) |
const |
|
inline |
◆ operator>=()
| bool tempoch::MJD::operator>= |
( |
const MJD & |
o | ) |
const |
|
inline |
◆ to_jd()
Convert to JD.
Definition at line 182 of file time.hpp.
◆ to_utc()
| UTC tempoch::MJD::to_utc |
( |
| ) |
const |
|
inline |
◆ value()
| constexpr double tempoch::MJD::value |
( |
| ) |
const |
|
inlineconstexpr |
The documentation for this class was generated from the following file: