timestamp-cmd
Reveal timestamp misteries readable datetime from the command-line.
What It Does
ts 1502056440# output: Sunday, August 6, 2017 9:20 PM ts 1502056440 -l fr#output: dimanche 6 août 2017 21:20 ts 1502056440 -l ru -f LL#output: 6 августа 2017 г.
How To Use It
# Simply type ts + the timestamp ts [timestamp] # adding language option -l or --lang ts [timestamp] -l frts [timestamp] --lang fr # adding formatting option -f or --format ts [timestamp] -f LLLLts [timestamp] --format LLLL # combining both ts [timestamp] -l en -f LLts [timestamp] --lang en --format LL
Default Settings
- lang: en (english)
- format: LLLL (for ex with ennglish lang: Sunday, August 6, 2017 11:54 PM)
Changing Default Settings
# set default lang with -L or --defaultLang ts -L frts --defaultLang fr # set default lang with -F or --defaultFormat ts -F LLLLts --defaultFormat LLLL # reset to default settings with -R or --resetConfig ts -Rts --resetConfig
Documentation
- lang: check out .local() function doc from momentjs documentation
- format: check out .format() function doc from momentjs documentation
Roadmap
# possible updates - Adding offsets handling # Any other idea? please PR
Changelog
# version 0.0.1 - Handle any timestamp with -language- and -format- handling- Settings and Default Settings management# ... 0.0.12 - Minor fixes # ... 0.0.13 - Remove unwanted dependency: Inquirer