JavaScript Countdown Script Generator

Month, day and year are required. The rest of the fields are optional.


 
start text:  end text:


copy to clipboard
<div style="display:table;margin:auto;text-align:center;background-color:{{bgc}};border:{{bord}} {{bordsz}}px {{bordc}};padding:{{padd}}px;color:{{txtc}};font-size:{{txtsz}}px;">
<img src="{{imgurl}}" alt="" style="width:{{imgw}}px;" />
<div style="padding-bottom:{{padd}}px;"></div>
{{stext}}
<script>
var date = new Date("{{month}} {{day}}, {{year}}");
var now = new Date();
var diff = date.getTime() - now.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > 1) {
document.write(days+1 + " Days");
}
else if (days == 1) {
document.write("Two Days");
}
else if (days == 0) {
document.write("Tomorrow");
}
else {
document.write("Today");
}
</script>
{{etext}}
</div>
Riverdrift.comroadrun
1999 - 2024    Made in the U.S.A