mod civil;
pub mod constats;
mod context;
mod data;
mod delta_t;
pub(crate) mod encoding;
pub mod eop;
pub mod error;
pub mod ext;
pub(crate) mod generated;
mod interval;
pub mod representation;
pub mod scalar;
mod scale;
mod sealed;
mod target;
mod time;
#[cfg(feature = "serde")]
#[path = "serde.rs"]
mod serde_impl;
#[cfg(feature = "serde")]
pub mod tagged;
pub use constats::{
GPS_EPOCH_JD_TAI, GPS_EPOCH_JD_UTC, GPS_EPOCH_TAI_MINUS_UTC, UTC_DEFINED_FROM_MJD,
};
pub use context::TimeContext;
#[cfg(feature = "runtime-data-fetch")]
pub use data::active::{
fetch_latest_time_data, refresh_runtime_time_data, update_runtime_time_data,
};
pub use delta_t::{delta_t_seconds, delta_t_seconds_extrapolated, DELTA_T_PREDICTION_HORIZON_MJD};
pub use error::{ConversionError, TimeDataError};
pub use ext::TimeInstant;
pub use generated::{
EOP_END_MJD, EOP_OBSERVED_END_MJD, EOP_START_MJD, MODERN_DELTA_T_OBSERVED_END_MJD,
};
pub use interval::{
complement_within, Interval, InvalidIntervalError, InvalidPeriodError, Period, PeriodListError,
};
pub use representation::{
EncodedTime, GpsTime, InfallibleRepresentationForScale, J2000Seconds, J2000s, JulianDate,
ModifiedJulianDate, RepresentationForScale, TimeRepresentation, Unix, UnixTime, GPS, J2000_TT,
JD, JULIAN_YEAR_DAYS, MJD,
};
pub use scalar::{
scalar_add_days, scalar_difference_in_days, time_tt_from_scalar, time_tt_to_scalar, ScaleKind,
};
pub use scale::{ContinuousScale, CoordinateScale, Scale, TAI, TCB, TCG, TDB, TT, UT1, UTC};
pub use target::{ContextConversionTarget, ConversionTarget, InfallibleConversionTarget};
pub use time::Time;
#[cfg(test)]
mod size_tests {
use super::*;
#[test]
fn time_uses_compensated_pair_storage() {
assert_eq!(core::mem::size_of::<Time<TT>>(), 16);
assert_eq!(core::mem::size_of::<Time<TAI>>(), 16);
assert_eq!(core::mem::size_of::<Time<TDB>>(), 16);
assert_eq!(core::mem::size_of::<Time<TCG>>(), 16);
assert_eq!(core::mem::size_of::<Time<TCB>>(), 16);
assert_eq!(core::mem::size_of::<Time<UT1>>(), 16);
assert_eq!(core::mem::size_of::<Time<UTC>>(), 16);
}
}