Crates.io | timeago-cli |
lib.rs | timeago-cli |
version | 0.5.0 |
source | src |
created_at | 2020-10-22 04:41:16.847022 |
updated_at | 2022-01-13 01:15:06.665851 |
description | A dead-simple CLI tool to convert RFC2822 to short humanized strings |
homepage | |
repository | |
max_upload_size | |
id | 304146 |
size | 45,519 |
A dead-simple CLI to convert RFC2822 to short humanize strings. Useful for prompts
$ timeago 'Wed, 21 Oct 2020 00:07:08 -0700'
Use it with git log
to get how far back the last commit was
$ timeago "$(git log -1 --format=%cD)"
12h
cargo install timeago-cli
You can get longer strings with --long
$ timeago "$(git log -1 --format=%cD)" --long
12 hours
Or precise timeago strings with --precise
$ timeago "$(git log -1 --format=%cD)" --precise
12 hours 30 minutes and 19 seconds
Customize the separator (default
) with --seperator
$ timeago "$(git log -1 --format=%cD)" --precise --separator '|'
12h|31m|43s