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 exact::ExactBrightDate;pub use instant::BrightInstant;pub use pbd::bright_date_from_pbd;pub use pbd::bright_date_to_pbd;pub use pbd::bright_instant_from_pbd;pub use pbd::bright_instant_to_pbd;pub use pbd::brightdate_to_label;pub use pbd::compare_exact_pbd;pub use pbd::compare_pbd;pub use pbd::format_bright_label;pub use pbd::format_pbd;pub use pbd::from_bright_label;pub use pbd::from_exact_pbd;pub use pbd::from_pbd;pub use pbd::is_pbd_later;pub use pbd::parse_bright_label;pub use pbd::parse_pbd;pub use pbd::pbd_era;pub use pbd::pbd_page;pub use pbd::to_bright_label;pub use pbd::to_exact_pbd;pub use pbd::to_pbd;pub use pbd::BrightLabel;pub use pbd::ExactPbd;pub use pbd::Pbd;pub use pbd::DEFAULT_BD_PRECISION;pub use pbd::DEFAULT_PBD_PRECISION;pub use pbd::PBD_ERA_PICOSECONDS;pub use pbd::PBD_ERA_SECONDS;pub use pbd::PBD_ERA_SECONDS_F;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
- 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.
- exact
ExactBrightDate— bit-exact picosecond-precision time.- formatting
- Formatting BrightDate values as human-readable strings.
- 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.
- pbd
- PBD — Pre-BrightDate Eras (Tera-second paging).
- scheduling
- BrightDate Scheduling Utilities
- serialization
- BrightDate Serialization
- 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.