This commit is contained in:
Boof 2023-06-01 08:14:32 +02:00 committed by GitHub
parent 16bfccdac1
commit 6294f21a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
<body>
<div style="text-align: center;">
<p>If you were born on the 8th of June 2009 you would be</p>
<p>If you were born on the 8th of June 2009 then you are</p>
<h3 id="ageYears"></h3>
<h3 id="ageDays"></h3>
<h3 id="ageHours"></h3>

View File

@ -9,9 +9,9 @@ function calculateYearsSince() {
//const hours = Math.floor((diffInMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
//const minutes = Math.floor((diffInMs % (1000 * 60 * 60)) / (1000 * 60));
document.getElementById("ageYears").innerText = Math.floor(diffInYears) + " years,"
document.getElementById("ageDays").innerText = days + " days,"
document.getElementById("ageHours").innerText = hours + " hours and"
document.getElementById("ageYears").innerText = Math.floor(diffInYears) + " years"
document.getElementById("ageDays").innerText = days + " days"
document.getElementById("ageHours").innerText = hours + " hours"
document.getElementById("ageMinutes").innerText = minutes + " minutes"
}