Epoch

Enum Epoch 

Source
pub enum Epoch {
    JulianPeriod,
    JulianCalendar,
    GregorianCalendar,
    J1900_0,
    E1900_0,
    Unix,
    TimeStandard,
    J1991_25,
    Y2k,
    J2000_0,
    J2100_0,
    J2200_0,
}
Expand description

A reference for a well known Instant in time, used for offsetting events from.

Variants§

§

JulianPeriod

The start of the Julian Period, which is 4713 BCE on Jan 1st Julian, 00:00:00.0 Specified in TT (in accordance with the International Astronomical Union since 1997)

§

JulianCalendar

The start of the Julian Calendar period, which is January 1st, CE 1, 00:00:00.0 in the Julian calendar. Specified in TT Note that this is exactly two days prior to the Gregorian Epoch.

Not to be confused with the JulianPeriodEpoch which is much earlier.

§

GregorianCalendar

The start of the Gregorian Calendar period, which is January 1st, CE 1, 00:00:00.0 in the Gregorian calendar. Specified in TT

§

J1900_0

The J1900.0 astronomical epoch, which is December 31, 1899 CE gregorian, 12:00:00.0 Specified in TT

§

E1900_0

The 1900.0 astronomical epoch which is January 1st, 1900 CE gregorian, 00:00:00.0 Specified in TT

§

Unix

The UNIX Epoch, which is January 1st, 1970 CE gregorian, 00:00:00.0 Specified in UTC

§

TimeStandard

The Time Standard Epoch where TT, TCB, and TCG all read the same. which is January 1st, 1977 CE gregorian, 00:00:32.184 Specified in TT, TCB and TCG, where they align

§

J1991_25

The J1991.25 astronomical epoch, which is April 2, 1991 CE gregorian, 13:30:00.0 Specified in TT

§

Y2k

The Year 2000 which is January 1st, 2000 CE gregorian, 00:00:00.0 Specified in UTC

§

J2000_0

The J2000.0 astronomical epoch, which is January 1, 2000 CE gregorian, 12:00:00.0 Specified in TT

§

J2100_0

The J2100.0 astronomical epoch, which is January 1, 2100 CE gregorian, 12:00:00.0 Specified in TT

§

J2200_0

The J2200.0 astronomical epoch, which is January 2, 2200 CE gregorian, 12:00:00.0 Specified in TT

Implementations§

Source§

impl Epoch

Source

pub const fn as_instant(&self) -> Instant

Generate the Instant that this Epoch refers to

Auto Trait Implementations§

§

impl Freeze for Epoch

§

impl RefUnwindSafe for Epoch

§

impl Send for Epoch

§

impl Sync for Epoch

§

impl Unpin for Epoch

§

impl UnwindSafe for Epoch

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.