34 tempoch_period_mjd_t m_inner;
66 double start_mjd()
const {
return m_inner.start_mjd; }
69 double end_mjd()
const {
return m_inner.end_mjd; }
79 return tempoch_period_mjd_duration_days(m_inner);
89 tempoch_period_mjd_t out;
91 tempoch_period_mjd_intersection(m_inner, other.m_inner, &out),
92 "Period::intersection"
98 const tempoch_period_mjd_t&
c_inner()
const {
return m_inner; }
Modified Julian Date wrapper (value type).
A time period [start, end] in MJD.
double start_mjd() const
Inclusive period start as raw MJD days.
Period intersection(const Period &other) const
Compute the overlapping interval with another period.
static Period from_c(const tempoch_period_mjd_t &c)
Construct from the C struct (unchecked).
MJD start() const
Inclusive period start as a typed MJD value.
double duration_days() const
Duration in days.
Period(const MJD &start, const MJD &end)
Construct a period from typed MJD values.
MJD end() const
Inclusive period end as a typed MJD value.
const tempoch_period_mjd_t & c_inner() const
Access the underlying FFI POD value.
Period(double start_mjd, double end_mjd)
Construct a period from start/end MJD values.
double end_mjd() const
Inclusive period end as raw MJD days.
void check_status(tempoch_status_t status, const char *operation)
Check a tempoch_status_t and throw the appropriate exception on error.
C++ wrappers for Julian Date, Modified Julian Date, and UTC.