View Source SpaceDust.Time.JulianDate (Space Dust v0.3.0)
Julian Date (JD).
The Julian Date is a continuous count of days since the beginning of the Julian Period on January 1, 4713 BC (proleptic Julian calendar) at noon Universal Time.
Julian Date is widely used in astronomy because it provides a uniform time measure without the complexities of calendar systems.
Common reference epochs:
- J2000.0: JD 2451545.0 (2000-01-01 12:00:00 TT)
- Unix epoch: JD 2440587.5 (1970-01-01 00:00:00 UTC)
Modified Julian Date (MJD) = JD - 2400000.5
Summary
Functions
Add days to Julian Date.
Add seconds to Julian Date.
Difference between two Julian Dates in days.
Difference between two Julian Dates in seconds.
Create from Modified Julian Date.
Create from Nx tensor.
Get J2000.0 epoch as Julian Date.
Calculate Julian centuries since J2000.0.
Calculate Julian millennia since J2000.0.
Create a Julian Date.
Get the Julian Date value.
Convert to Modified Julian Date.
Convert to Nx tensor.
Convert to fractional day of year and year. Returns {year, day_of_year} where day_of_year is 1-based and fractional.
Types
@type t() :: %SpaceDust.Time.JulianDate{jd: float()}
Functions
Add days to Julian Date.
Add seconds to Julian Date.
Difference between two Julian Dates in days.
Difference between two Julian Dates in seconds.
Create from Modified Julian Date.
@spec from_tensor(Nx.Tensor.t()) :: t()
Create from Nx tensor.
@spec j2000() :: t()
Get J2000.0 epoch as Julian Date.
Calculate Julian centuries since J2000.0.
Calculate Julian millennia since J2000.0.
Create a Julian Date.
Get the Julian Date value.
Convert to Modified Julian Date.
@spec to_tensor(t()) :: Nx.Tensor.t()
Convert to Nx tensor.
Convert to fractional day of year and year. Returns {year, day_of_year} where day_of_year is 1-based and fractional.