4 releases

0.1.3 Nov 21, 2021
0.1.2 Nov 17, 2021
0.1.1 Nov 17, 2021
0.1.0 Nov 16, 2021

#288 in Value formatting

Download history 407/week @ 2025-08-28 355/week @ 2025-09-04 391/week @ 2025-09-11 425/week @ 2025-09-18 555/week @ 2025-09-25 480/week @ 2025-10-02 602/week @ 2025-10-09 644/week @ 2025-10-16 425/week @ 2025-10-23 328/week @ 2025-10-30 429/week @ 2025-11-06 472/week @ 2025-11-13 373/week @ 2025-11-20 414/week @ 2025-11-27 332/week @ 2025-12-04 298/week @ 2025-12-11

1,476 downloads per month
Used in 4 crates

MIT license

22KB
453 lines

time-humanize - A crate to display std::time::Duration in a human readable way

Example

use std::time::Duration;
use time_humanize::HumanTime;

let duration = Duration::from_secs(60);

println!("{}", HumanTime::from(duration));
println!("{}", HumanTime::from_seconds(-60));


time-humanize

A rust crate that displays duration in a human readable format.

This project is a port of chrono-humanize-rs and now has 0 dependencies.

Usage

use std::time::Duration;
use time_humanize::HumanTime;


let duration = Duration::from_secs(60);
let human_time = HumanTime::from(duration);
println!("{}", human_time);

Dependencies

~200KB