cointop-sh / cointop

A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀
https://cointop.sh
Apache License 2.0
4.03k stars 311 forks source link

Support locale-specific formatting of date/time #206

Closed lyricnz closed 3 years ago

lyricnz commented 3 years ago

On chart X-axis labels and last_updated column. See #188

lyricnz commented 3 years ago

This code obeys $LC_TIME first, then the (platform-specific) locales second - see https://github.com/jeandeaual/go-locale (I have submitted upstream issue to use LC_xxx variables - https://github.com/jeandeaual/go-locale/issues/10)

The actual formatting uses https://github.com/goodsign/monday to translate day/month names (including abbreviations).

lyricnz commented 3 years ago

Further work:

lyricnz commented 3 years ago

Example LC_TIME=hu-HU ./bin/cointop

Screen Shot 2021-10-08 at 11 25 15 am
miguelmota commented 3 years ago

Thanks @lyricnz! Merged