diff --git a/src/utils/math.ts b/src/utils/math.ts index 37a35a0..06a5b6e 100644 --- a/src/utils/math.ts +++ b/src/utils/math.ts @@ -1,4 +1,6 @@ export function calculateAge(birthDate: Date) { + birthDate.setMonth(birthDate.getMonth() - 1); + let today = new Date(); let years = today.getFullYear() - birthDate.getFullYear(); let months = today.getMonth() - birthDate.getMonth();