# This replay will be removed in...

Days

Hours

Minutes

Second

Days

Hours

Minutes

## 12

Second

``` // Set the date we're counting down to var countDownDate = new Date("Oct 31, 2021 23:59:59").getTime(); // Update the count down every 1 second var x = setInterval(function() { // Get today's date and time var now = new Date().getTime(); // Find the distance between now and the count down date var distance = countDownDate - now; // Time calculations for days, hours, minutes and seconds var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); // Output the result in an element with id="demo" \$html = '<div class="cz_countdown">'; \$html += '<div class="day">'; \$html += '<div class="countnum"><h2>' + days + '</2></div>'; \$html += '<span>' + 'Days' + '</span>'; \$html += '</div>'; \$html += '<div class="hour">'; \$html += '<div class="countnum"><h2>' + hours + '</2></div>'; \$html += '<span>' + 'Hours' + '</span>'; \$html += '</div>'; \$html += '<div class="minute">'; \$html += '<div class="countnum"><h2>' + minutes + '</2></div>'; \$html += '<span>' + 'Minutes' + '</span>'; \$html += '</div>'; \$html += '<div class="second">'; \$html += '<div class="countnum"><h2>' + seconds + '</2></div>'; \$html += '<span>' + 'Second' + '</span>'; \$html += '</div>'; \$html += '</div>'; document.getElementById("endScript").innerHTML = \$html; // If the count down is over, write some text if (distance < 0) { clearInterval(x); setInterval(x); jQuery('#titleremoveAfterCounter').hide(); jQuery('#panelremoveAfterCounter2').hide(); document.getElementById("endScript").innerHTML = "<h4>This replay has been removed, but please look out for emails for our next free trainings!</4>"; /*setTimeout(function(){ window.location = "https://www.thefreedomtrader.com/free-training-replay-finished/"; }, 1000);*/ }else{ jQuery('#titleremoveAfterCounter').show(); jQuery('#panelremoveAfterCounter2').show(); } }, 1000); function getWeekBegin() { var now = new Date(); var next = new Date(now.getFullYear(), now.getMonth(), now.getDate()+(7 - now.getDay())); return next; } ```

If you are experiencing any technical difficulties with accessing the video below,