This commit is contained in:
Boof 2023-05-31 14:02:21 +02:00 committed by GitHub
parent 9e1fbb6825
commit f3028060ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,5 @@
function calculateYearsSince() {
const now = new Date().getTime();
const diffInMs = now.now() - now.getTime();
const diffInMs = Date.now() - Date.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));