Skip to content

Commit

Permalink
Update timer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
redd-rl authored Jan 31, 2025
1 parent 6114c65 commit d1dbfc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions static/nti/scripts/timer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Set the date we're counting down to
var currentYear = new Date().getFullYear();
var countDownDate = new Date("June 5, " + currentYear + " 11:59:59 PM GMT+1 (CET)").getTime();
var countDownDate = new Date("June 5, " + currentYear + " 08:00:00 AM GMT+1 (CET)").getTime();
var now = new Date().getTime();
if (countDownDate < now) {
var currentYear = new Date().getFullYear()+1;
var countDownDate = new Date("June 5, " + currentYear + " 11:59:59 PM GMT+1 (CET)").getTime();
var countDownDate = new Date("June 5, " + currentYear + " 08:00:00 AM GMT+1 (CET)").getTime();
}
// Update the count down every 1 second
var x = setInterval(function() {
Expand All @@ -14,7 +14,7 @@ var x = setInterval(function() {
var distance = countDownDate - now;
if (countDownDate < now) {
currentYear = new Date().getFullYear()+1;
countDownDate = new Date("June 5, " + currentYear + " 11:59:59 PM GMT+1 (CET)").getTime();
countDownDate = new Date("June 5, " + currentYear + " 08:00:00 AM GMT+1 (CET)").getTime();
}
// Calculate the number of days until the countdown date
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
Expand Down Expand Up @@ -85,7 +85,7 @@ var x = setInterval(function() {
} else {
document.getElementsByClassName("rainbow_text_animated")[0].textContent = "Error\r\n";
currentYear = new Date().getFullYear()+1;
countDownDate = new Date("June 5, " + currentYear + " 11:59:59 PM GMT+1 (CET)").getTime();
countDownDate = new Date("June 5, " + currentYear + " 08:00:00 AM GMT+1 (CET)").getTime();
}
// code written up by chatgpt xx love you mwah
}, 1000);

0 comments on commit d1dbfc5

Please sign in to comment.