Skip to content

Commit

Permalink
repair bug fix without testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fab3F committed Mar 10, 2024
1 parent afc130b commit 5413677
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/agecalc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ function calculateAge() {
const birthdate = new Date(input.value);
const currentDate = new Date();

birthdate.setHours(0, 0, 0, 0);
currentDate.setHours(0, 0, 0, 0);
birthdate.setHours(currentDate.getHours());

const ageMilliseconds = currentDate - birthdate;
const ageYears = ageMilliseconds / (1000 * 60 * 60 * 24 * 365.25);
Expand Down

0 comments on commit 5413677

Please sign in to comment.