1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (C) 2026 Vallés Puig, Ramon
//! Time Module
//!
//! This module provides time-related types and abstractions for astronomical calculations.
//!
//! # Core types
//!
//! - [`Time<S>`] — generic instant parameterised by a [`TimeScale`] marker.
//! - [`TimeScale`] — trait that defines a time scale (epoch offset + conversions).
//! - [`JulianDate`] — type alias for `Time<JD>`.
//! - [`JulianEphemerisDay`] — type alias for `Time<JDE>`.
//! - [`ModifiedJulianDate`] — type alias for `Time<MJD>`.
//! - [`Period<S>`] — a time interval parameterised by a [`TimeScale`] marker.
//! - [`Interval<T>`] — a generic interval over any [`TimeInstant`].
//! - [`TimeInstant`] — trait for points in time usable with [`Interval`].
//!
//! # Time scales
//!
//! The following markers implement [`TimeScale`]:
//!
//! | Marker | Scale |
//! |--------|-------|
//! | [`JD`] | Julian Date |
//! | [`JDE`] | Julian Ephemeris Day |
//! | [`MJD`] | Modified Julian Date |
//! | [`TDB`] | Barycentric Dynamical Time |
//! | [`TT`] | Terrestrial Time |
//! | [`TAI`] | International Atomic Time |
//! | [`TCG`] | Geocentric Coordinate Time |
//! | [`TCB`] | Barycentric Coordinate Time |
//! | [`GPS`] | GPS Time |
//! | [`UnixTime`] | Unix / POSIX time |
//! | [`UT`] | Universal Time (Earth rotation) |
//!
//! # ΔT (Delta T)
//!
//! The difference **ΔT = TT − UT** is applied automatically by the
//! [`UT`] time scale. Use `Time::<UT>::new(jd_ut)` for UT-based values,
//! or construct any scale via `from_utc()` which routes through `UT` internally.
//! The raw ΔT value (in seconds) is available via [`Time::<UT>::delta_t()`](Time::delta_t).
pub
// ── Re-exports ────────────────────────────────────────────────────────────
pub use ;
pub use ;
pub use ;
// ── Backward-compatible type aliases ──────────────────────────────────────
/// Julian Date — continuous count of days since the Julian Period.
///
/// This is a type alias for [`Time<JD>`]. All historical call-sites
/// (`JulianDate::new(...)`, `JulianDate::J2000`, `.julian_centuries()`, …)
/// continue to work without modification.
pub type JulianDate = ;
/// Julian Ephemeris Day — dynamical Julian day used by many ephemeris formulas.
///
/// This is a type alias for [`Time<JDE>`].
pub type JulianEphemerisDay = ;
/// Modified Julian Date — `JD − 2 400 000.5`.
///
/// This is a type alias for [`Time<MJD>`].
pub type ModifiedJulianDate = ;
/// Universal Time — Earth-rotation civil time scale.
///
/// This is a type alias for [`Time<UT>`].
pub type UniversalTime = ;