mirror of
https://github.com/hexahigh/080609.git
synced 2025-12-11 19:55:06 +01:00
i forgot to change that
This commit is contained in:
parent
432a35bb6b
commit
9e1fbb6825
6
index.js
6
index.js
@ -1,6 +1,6 @@
|
||||
function calculateYearsSince(date) {
|
||||
function calculateYearsSince() {
|
||||
const now = new Date().getTime();
|
||||
const diffInMs = Date.now() - date.getTime();
|
||||
const diffInMs = now.now() - now.getTime();
|
||||
const diffInYears = diffInMs / (1000 * 60 * 60 * 24 * 365.25);
|
||||
const days = Math.floor(diffInMs / (1000 * 60 * 60 * 24));
|
||||
const hours = Math.floor((diffInMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
@ -43,4 +43,4 @@ function countdown() {
|
||||
|
||||
// Call the countdownTimer() function every second using setInterval
|
||||
setInterval(countdown, 500);
|
||||
setInterval(document.getElementById("age").innerText = calculateYearsSince(myDate) + " Years old", 2000)
|
||||
setInterval(calculateYearsSince, 2000)
|
||||
Loading…
x
Reference in New Issue
Block a user