Remove unneeded curly braces
This commit is contained in:
@@ -4,14 +4,14 @@ export function age() {
|
|||||||
|
|
||||||
let age = now.getFullYear() - birthdate.getFullYear()
|
let age = now.getFullYear() - birthdate.getFullYear()
|
||||||
|
|
||||||
if (now.getMonth() < birthdate.getMonth()) {
|
if (now.getMonth() < birthdate.getMonth())
|
||||||
age--
|
age--
|
||||||
}
|
|
||||||
if (
|
if (
|
||||||
birthdate.getMonth() === now.getMonth() &&
|
birthdate.getMonth() === now.getMonth() &&
|
||||||
now.getDate() < birthdate.getDate()
|
now.getDate() < birthdate.getDate()
|
||||||
) {
|
)
|
||||||
age--
|
age--
|
||||||
}
|
|
||||||
return age
|
return age
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user