Day 2704 / bttf for CLI time parsing and interesting help pattern
BurntSushi/bttf: A command line tool for datetime arithmetic, parsing, formatting and more.
I use wolframalpha for most of my casual date ops etc. but the project is cool and I may need it.
But the most interesting bit is the documentation.
Quoting README:
I may ship arbitrary and capricious breaking changes at this point. You have been warned. […] And it doesn’t give a hoot about POSIX (other than the
TZenvironment variable).
And THIS. I either love it or hate it, can’t decide:
-h/--help
This flag prints the help output for bttf.
Unlike most other flags, the behavior of the short flag, -h, and the
long flag, --help, is different. The short flag will show a condensed
help output while the long flag will show a verbose help output.
It breaks my usual expectations but damn it’s a cool pattern that I really want to be a thing! You’re allowed to break conventions if your thing is really smarter and you’re explicit and intentional about it.