macro_rules! as_weeks_f {
($x:expr) => { ... };
}Expand description
Converts total attoseconds (i128) โ lossy float weeks (Real).
Equivalent to Dt::attos_to_weeks_f.
A week is 7 civil days (604800 seconds).
ยงExamples
Example shows attos inputs being built with macros rather than counting attosecond zeros by hand.
use deep_time::macros::{as_weeks_f, days, hours, weeks};
// an amount of attoseconds that is equal to
// โ1.5 wk becomes -1.5 weeks
assert_eq!(as_weeks_f!(-weeks!(1) - days!(3) - hours!(12)), -1.5);