mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-06 06:20:30 +02:00
Update index.js
This commit is contained in:
parent
127b465310
commit
d66987b66b
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ const updateAge = () => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const diff = now.getTime() - birthday.getTime();
|
const diff = now.getTime() - birthday.getTime();
|
||||||
age = diff / (1000 * 60 * 60 * 24 * 365.25);
|
age = diff / (1000 * 60 * 60 * 24 * 365.25);
|
||||||
ageElem.innerHTML = `${age.toFixed(2)} years old`;
|
ageElem.innerHTML = `${age} years old`;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateAge();
|
updateAge();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue