| Crates.io | chrono-humanize |
| lib.rs | chrono-humanize |
| version | 0.2.3 |
| created_at | 2016-07-11 16:06:40.04479+00 |
| updated_at | 2023-07-22 21:23:36.487637+00 |
| description | Human-friendly time expressions - similar to Python arrow.humanize |
| homepage | https://gitlab.com/imp/chrono-humanize-rs |
| repository | https://gitlab.com/imp/chrono-humanize-rs.git |
| max_upload_size | |
| id | 5629 |
| size | 79,562 |
Build status
| branch | status |
|---|---|
| master | |
| develop |
use chrono::{Local, Duration};
use chrono_humanize::HumanTime;
let dt = Local::now() + Duration::days(35);
let ht = HumanTime::from(dt);
let english = format!("{}", ht);
assert_eq!("in a month", english);