cipchk / ngx-countdown

Simple, easy and performance countdown for angular
https://cipchk.github.io/ngx-countdown/
MIT License
192 stars 57 forks source link

Autoformat leading 0's? #57

Closed TomWaterz closed 4 years ago

TomWaterz commented 4 years ago

Is there a way to auto format and remove the 0's? If there are no days it doesn't show the 00 for days but if there are then it shows the day number?

javiersantossanchez commented 4 years ago

Is there a way to auto format and remove the 0's? If there are no days it doesn't show the 00 for days but if there are then it shows the day number?

Hello @tommhendrick Yes you can use the prettyText property of CountdownConfig to format your output as you want.

There is an example to remove the hours when the time is less: https://stackblitz.com/edit/ngx-countdown-setup-a6rgmo

cipchk commented 4 years ago

@tommhendrick May be the Custom format date example is what you want.