[−][src]Function secfmt::from
pub fn from(s: u64) -> Secfmt
Converts seconds into a human readable format (struct) containing years, days, hours, minutes and seconds.
Examples
let seconds = 31537529; let seconds_human_readable = secfmt::from(seconds); assert_eq!(1, secfmt::from(31537529).years); assert_eq!(0, secfmt::from(31537529).days); assert_eq!(0, secfmt::from(31537529).hours); assert_eq!(25, secfmt::from(31537529).minutes); assert_eq!(29, secfmt::from(31537529).seconds);