diff --git a/home.html b/home.html index 85c616b..0ffc8aa 100644 --- a/home.html +++ b/home.html @@ -311,6 +311,15 @@

Eieruhr

Du kannst die Website auch als App benutzen, indem du im Menü auf "Zum Startbildschrim hinzufügen" tippst!

+
+ + + +

Alter berechnen

+

+ Diese Uhr zeigt dir in Echtzeit an, wie alt du bist - auf die Millisekunde genau! +

+
diff --git a/index.html b/index.html index 85c616b..0ffc8aa 100644 --- a/index.html +++ b/index.html @@ -311,6 +311,15 @@

Eieruhr

Du kannst die Website auch als App benutzen, indem du im Menü auf "Zum Startbildschrim hinzufügen" tippst!

+
+ + + +

Alter berechnen

+

+ Diese Uhr zeigt dir in Echtzeit an, wie alt du bist - auf die Millisekunde genau! +

+
diff --git a/js/agecalc.js b/js/agecalc.js index 673e847..4bde999 100644 --- a/js/agecalc.js +++ b/js/agecalc.js @@ -6,11 +6,22 @@ function calculateAge() { const currentDate = new Date(); birthdate.setHours(currentDate.getHours()); + birthdate.setMinutes(currentDate.getMinutes()); + birthdate.setSeconds(currentDate.getSeconds()); + birthdate.setMilliseconds(currentDate.getMilliseconds()); const ageMilliseconds = currentDate - birthdate; const ageYears = ageMilliseconds / (1000 * 60 * 60 * 24 * 365.25); - if(input.value) - output.innerHTML = "Dein aktuelles Alter in Jahren beträgt: " + ageYears.toFixed(10); + + if (input.value) + output.innerHTML = "Dein aktuelles Alter in Jahren beträgt: " + formatAgeYears(ageYears); +} + +function formatAgeYears(ageYears) { + const parts = ageYears.toString().split('.'); + const yearPart = parts[0]; + const decimalPart = parts.length > 1 ? '.' + parts[1] : ''; + return `${yearPart}${decimalPart}`; } const today = new Date(); diff --git a/sitemap.xml b/sitemap.xml index b3fb0cc..075962f 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,12 +2,12 @@ https://fab3f.github.io - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 1 https://fab3f.github.io/idn - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.2 diff --git a/sitemap_links.xml b/sitemap_links.xml index 795b68f..6126b1e 100644 --- a/sitemap_links.xml +++ b/sitemap_links.xml @@ -2,47 +2,47 @@ https://fab3f.github.io/link/discord - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/easyflick - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/github - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/instagram - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/profikoch - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/twitch - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/twitter - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/x - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 https://fab3f.github.io/link/youtube - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.4 diff --git a/sitemap_projects.xml b/sitemap_projects.xml index a47607a..07e9ef6 100644 --- a/sitemap_projects.xml +++ b/sitemap_projects.xml @@ -2,72 +2,72 @@ https://fab3f.github.io/online-csv-viewer - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/online-sqlite-viewer - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/projects/discordbot/ - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/projects/discordbot/help - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.6 https://fab3f.github.io/projects/discordbot/tp - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.2 https://fab3f.github.io/projects/twitchbot/ - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/projects/twitchbot/tp - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.2 https://fab3f.github.io/eieruhr/ - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/link/profikoch - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/projects/agecalc - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/projects/mkaq - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/projects/neoncursor - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/rickrollprotector - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7 https://fab3f.github.io/hyperspace-animaton - 2023-10-31T12:00:00+00:00 + 2024-04-28T12:00:00+00:00 0.7