Archived
Fix bug calculateAge birthday message
This commit is contained in:
1 parent
1a5c424d8f
commit
c91feaa895
1 file changed
+1
-1
@@ -76,7 +76,7 @@ function calculateAge(birthDateEntered) {
|
||||
if(isValidDateFunction === true)
|
||||
{
|
||||
// Si c'est ton anniversaire aujourd'hui
|
||||
if(birthDateDay === parseInt(day) && birthDateMonth === parseInt(month))
|
||||
if(birthDateDay === parseInt(day) && (parseInt(birthDateMonth) + 1) === parseInt(month))
|
||||
{
|
||||
return 'Vous avez ' + ageYears + ' ans. Joyeux Anniversaire! 🥳';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user