Changed timer

This commit is contained in:
James Dinh 2022-08-13 00:21:43 -07:00
parent c2bf4c7420
commit 3dc1c351ec

View File

@ -47,7 +47,7 @@ const tech_emails = document.querySelectorAll('.email-replace-tech');
// Timer // Timer
// SRC: W3Schools https://www.w3schools.com/howto/howto_js_countdown.asp // SRC: W3Schools https://www.w3schools.com/howto/howto_js_countdown.asp
// Set the date we're counting down to // Set the date we're counting down to
var countDownDate = new Date("Aug 12, 2022 16:00:00").getTime(); var countDownDate = new Date("Aug 14, 2022 14:00:00").getTime();
// Update the count down every 1 second // Update the count down every 1 second
var x = setInterval(function() { var x = setInterval(function() {
@ -74,7 +74,7 @@ if (days != 0) {
document.getElementById("timer").innerHTML = days + "d " + hours + "h"; document.getElementById("timer").innerHTML = days + "d " + hours + "h";
} }
else if (hours != 0) { else if (hours != 0) {
document.getElementById("timer").innerHTML = hours + "h" + minutes + "m"; document.getElementById("timer").innerHTML = hours + "h " + minutes + "m";
} }
else { else {
document.getElementById("timer").innerHTML = minutes + "m"; document.getElementById("timer").innerHTML = minutes + "m";