pub type TimeSplitYearDayNorm = TimeSplit<u64, u8, u8, (), (), (), (), (), ()>;
Available on crate feature
time
only.Expand description
A time split from years to days, normalized (128b size, 80b payload).
Aliased Type§
struct TimeSplitYearDayNorm {
pub y: u64,
pub mo: u8,
pub d: u8,
pub h: (),
pub m: (),
pub s: (),
pub ms: (),
pub us: (),
pub ns: (),
}
Fields§
§y: u64
Years.
mo: u8
Months.
d: u8
Days.
h: ()
Hours.
m: ()
Minutes.
s: ()
Seconds.
ms: ()
Milliseconds.
us: ()
Microseconds.
ns: ()
Nanoseconds.
Implementations§
Source§impl TimeSplitYearDayNorm
impl TimeSplitYearDayNorm
Sourcepub const fn from_duration(duration: Duration) -> Self
pub const fn from_duration(duration: Duration) -> Self
Converts a Duration
into a TimeSplitYearDay
.
This method assumes 365 days per year and 30 days per month for simplicity.