IntoDateTime

Trait IntoDateTime 

Source
pub trait IntoDateTime: Sized {
    // Required method
    fn into_datetime(self) -> (Date, u8, u8, u8);
}
Expand description

This trait represents the fact that some time instant may be mapped back to the date-time pair that it corresponds with, at an accuracy of seconds.

Required Methods§

Source

fn into_datetime(self) -> (Date, u8, u8, u8)

Maps a time point back to the date and time-of-day that it represents. Returns a tuple of date, hour, minute, and second. This function shall not fail, unless overflow occurs in the underlying integer arithmetic.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl IntoDateTime for UtcTime

Source§

impl<Scale> IntoDateTime for TimePoint<Scale>
where Scale: ?Sized + UniformDateTimeScale,

Source§

impl<TimePoint> IntoDateTime for TimePoint
where TimePoint: IntoLeapSecondDateTime,

We provide a default implementation that uses the static leap second provider.