Does anybody know how to make a dynamic countdown timer to a future date (Jan 1 2020) displaying by Days : Hours : Minutes : Seconds?
Any help would be much appreciated.
Though it's all not specifically made for AnimateCC Canvas and createJS. You'll have to improvise.
Thank you for the great details. That got me going in the right direction.
I found this and works perfect:
var book_release_date = new Date(2019,6,1); // for july, not june, 1st 2019 release date.
this.tf.text = formatF(book_release_date.getTime()-new Date().getTime());
var days = Math.floor(ms/(1000*60*60*24));
ms -= days*1000*60*60*24;
var hours = Math.floor(ms/(1000*60*60));
ms -= hours*1000*60*60
var min = Math.floor(ms/(1000*60));
ms -= min*1000*60;
var sec = Math.floor(ms/1000);
return ' '+padF(days)+' '+padF(hours)+' '+padF(min)+' '+padF(sec);
This works great! Thanks all. I don't need to display seconds in my timer, just days / hours / minutes - any ideas how I can hide the seconds display?