secfmt
Converts seconds into a human readable format (struct) containing years, days, hours, minutes and seconds.
Usage
Add this to your Cargo.toml
:
[]
= "0.1"
Add this to your *.rs
file:
extern crate secfmt;
Now you can proceed as follows:
Example 1
let seconds = 31537529;
let seconds_human_readable = from;
Example 2
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Example 3
let shr = from;
let s = format!;
assert_eq!;
Getting help
If you have questions or problems with secfmt
, then I'm happy to respond to GitHub issues.
License
secfmt is distributed under the terms of the MIT license.
See LICENSE for details.