Expand description
BrightDate — Universal Decimal Time System
A scientifically grounded, timezone-free time representation anchored at
J2000.0. One f64 value. Trivially sortable, diffable, and storable.
§Format
DDDDD.ddddd
↑ ↑
│ Fractional day (decimal time-of-day)
Integer days since J2000.0 epoch- Epoch: J2000.0 =
2000-01-01T12:00:00.000 TT=2000-01-01T11:58:55.816 UTC(Unix ms946_727_935_816) =JD 2_451_545.0=MJD 51_544.5. - Unit: SI days (86400 SI seconds).
- Timescale: TAI-coherent. The BrightDate clock ticks uniformly and has no leap-second discontinuities; leap seconds intervene only when converting to/from UTC labels (Unix ms, ISO strings).
§Quick Start
use brightdate::BrightDate;
let bd = BrightDate::from_unix_ms(1_700_000_000_000.0).unwrap();
println!("{}", bd); // e.g. "8704.09722"
println!("{}", bd.to_log_string()); // "[8704.09722]"
let tomorrow = bd.add_days(1.0);
let elapsed = tomorrow.difference(&bd); // 1.0Re-exports§
pub use display_label::compare_bd_labels;pub use display_label::format_bd;pub use display_label::format_bd_label;pub use display_label::parse_bd;pub use display_label::parse_bd_label;pub use display_label::BrightLabel;pub use display_label::DEFAULT_BD_PRECISION;pub use exact::ExactBrightDate;pub use exact_atto::ExactBrightAtto;pub use lens::brightdate_to_attoseconds;pub use lens::brightdate_to_picoseconds;pub use lens::ticks_to_brightdate;pub use lens::ATTOSECONDS_PER_DAY;pub use lens::ATTOSECONDS_PER_PICOSECOND;pub use lens::ATTOSECONDS_PER_SECOND;pub use lens::PICOSECONDS_PER_DAY;pub use instant::BrightInstant;pub use types::BrightDateComponents;pub use types::BrightDateOptions;pub use types::BrightDuration;pub use types::Precision;
Modules§
- arithmetic
- Arithmetic operations on BrightDate values.
- astronomy
- Astronomical utilities: sidereal time, solar position, lunar phase.
- calendar
- BrightDate Calendar Utilities
- civil_
time - BrightDate Local-Clock Bridge.
- comparisons
- Comparison and set utilities for collections of BrightDate values.
- constants
- Core constants for the BrightDate system.
- conversions
- Conversions between BrightDate values and other time representations.
- display_
label - Display Label —
BD/PBDprefix convention for BrightDate scalars. - exact
ExactBrightDate— bit-exact picosecond-precision time.- exact_
atto ExactBrightAtto— canonical v2 engine (attoseconds since J2000.0).- formatting
- Formatting BrightDate values as human-readable strings.
- geodesy
- BrightSpace Geodesy
- instant
BrightInstant— an exact, lossless time representation.- interplanetary
- BrightDate Interplanetary Utilities
- intervals
- BrightDate intervals — a closed
[start, end]time span. - leap_
seconds - Leap-second table lookup utilities.
- lens
- BrightDate lens — integer engine ↔ decimal-day presentation.
- relativity
- BrightDate Relativity Module
- scheduling
- BrightDate Scheduling Utilities
- serialization
- BrightDate Serialization
- spacetime
- BrightDate Spacetime Standard
- timezones
- BrightDate Timezone Utilities
- types
- Core type definitions for BrightDate.
- validation
- Validation utilities for BrightDate inputs.
Structs§
- Bright
Date - Immutable BrightDate value — decimal days since J2000.0 epoch.