pub fn format(d: Duration, style: Style) -> String
👎Deprecated since 0.1.0: Use Formatter or format_5chars
Expand description
Do the formatting. See Style
’s docstring for formatting options.
If you need just simple mode without bloated featureful implementation,
use version 0.0.2 of this crate
extern crate timeago;
assert_eq!(timeago::format(std::time::Duration::new(3600, 0), timeago::Style::LONG), "1 hour ago");