add format_human

This commit is contained in:
2020-05-31 21:44:52 +08:00
parent 33759001ff
commit 9cf7d07ee3
2 changed files with 68 additions and 2 deletions

View File

@@ -21,3 +21,12 @@ Formated date: 2020-05-30 13:32:04 +08:00
```
```rust
format_human(Duration::from_secs(2 * 24 * 60 * 60 + 1));
```
Output:
```
2days 0hour 0min 1s
```