4,595
edits
No edit summary |
No edit summary |
||
Line 101: | Line 101: | ||
age = math.floor(secondDate[4] - birthDate[4]) | age = math.floor(secondDate[4] - birthDate[4]) | ||
elseif birthDate[2] == secondDate[2] then | elseif birthDate[2] == secondDate[2] then | ||
if | if birthDate[3] <= secondDate[3] then | ||
age = math.floor(secondDate[4] - birthDate[4]) | age = math.floor(secondDate[4] - birthDate[4]) | ||
elseif | elseif birthDate[3] > secondDate[3] then | ||
age = math.floor(secondDate[4] - birthDate[4] - 1) | age = math.floor(secondDate[4] - birthDate[4] - 1) | ||
end | end |