I am using the JS library CountdownJS. I am wanting to return a zero value for each of the time units when applicable. Currently when the value is 0 the unit just doesn't show.
Here's what I want to see:
Here's what I currently see:
Anyone familiar with the library know where in the source I would look to update this?
Here's a really simple countdown function I wrote a while back. Feel free to use it however.
The only tricky part might be my use of
delta %= ...
returnsdelta
, after performing the%=
. This was just to save characters. If you don't like this, you can just separate thedelta %= ...
part:fiddle