Skip to content

A dead-simple CLI to convert RFC232 to short humanized strings

Notifications You must be signed in to change notification settings

jeffjose/timeago-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A dead-simple CLI to convert RFC2822 to short humanize strings

timeago-cli

A dead-simple CLI to convert RFC2822 to short humanize strings. Useful for prompts

Usage

$ 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

Install

cargo install timeago-cli

Options

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

About

A dead-simple CLI to convert RFC232 to short humanized strings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages