Skip to main content

Crate deep_time

Crate deep_time 

Source

Re-exports§

pub use sidereal::Sidereal;
pub use an_err::AnErr;
pub use error::DtErr;
pub use error::DtErrKind;

Modules§

an_err
civil_parts
Intermediate “parts” of a civil date and time.
constants
Fundamental constants for time-scale conversions, relativistic corrections, and astronomical calculations.
eop
Earth Orientation Parameters (EOP) data parser and interpolator.
error
DtErrKind and main error type DtErr.
historical_utc
Pre-1972 TAI−UTC historical offsets and linear drift rates from the official USNO tai-utc.dat (used by IAU SOFA).
leap_seconds
Leap seconds table from the official IANA leap-seconds.list Updated through IERS Bulletin C as of April 2026. Last leap second: 2017-01-01 (TAI-UTC = 37 s) File expires: 28 December 2026
lunar
Lunar time-scale constants and conversion methods.
mars
Mars time-scale constants and conversion methods (MSD, MTC, Ls, LMST, LTST, Mars Year).
math
Tested, const fn versions of libm float math functions. e.g. use deep_time::math::sin;
sidereal
Sidereal rotation and time calculations for celestial bodies.
tz

Macros§

an_err
Ergonomic constructor and chaining macro for AnErr.
f
Convert a number to the crates Real type (f64).

Structs§

Drift
Quadratic polynomial that describes the accumulated difference between an observer’s proper time (the time measured by a real clock moving through spacetime) and a chosen coordinate time such as TT, TAI, or any other Scale.
Dt
The library’s central time type. A high-precision instant/duration with attosecond resolution.
Every
Builder type that enables the ergonomic start.every(step) syntax.
LiteStr
A fixed-capacity, stack-allocated buffer that can hold a UTF-8 string.
Observer
An observer at a specific instant.
ParseCfg
Configuration options for Dt::from_str_parse.
Position
A 3-dimensional position vector expressed in Cartesian coordinates (x, y, z) with units of meters (SI).
Spacetime
The three local spacetime quantities that fully determine how fast an observer’s proper time advances relative to coordinate time.
StrPTimeFmt
A pre-validated, reusable date/time format string.
TimeRange
An iterator over evenly spaced Dt values.
Velocity
A 3-dimensional velocity vector expressed in Cartesian coordinates (vx, vy, vz) with units of meters per second (SI).
YmdHms
Combined date + time object.

Enums§

Lang
Language codes following ISO 639-1 standard (two-letter codes). Default is En (English)
Mode
Used by ParseCfg in Dt::from_str_parse. Controls how purely numeric dates are parsed.
Order
Used by ParseCfg in Dt::from_str_parse. Controls how ambiguous dates (e.g. 01/02/03) are parsed.
Scale
Time scales supported by the library.

Traits§

AttosTraits
Trait that adds ergonomic conversions from attoseconds values for i64, i128, and f64.
TimeTraits
Trait that adds ergonomic time-unit methods to integers and floats.

Type Aliases§

Real
Alias for f64, maybe upgrade one day