Closed kamsac closed 6 years ago
is there any more friendly way to do this? also can you make it so the time that's 0 from the left is not shown?
I think it already behaves like this. Any "time" that is 0 is not shown, so for example it displays "1h 1s", instead of "0d 1h 0m 1s". If you prefer different format, just tell and I'll change it. :)
You're right, forgot javascript had 0 as falsey. will try it out now
Also, I would write some unit tests for it, if jest was set up (it's not hard to set up, but I didn't want to introduce something like this, especially in single PR).
11289ca
https://github.com/meepen/salien-bot/pull/70