4,599
edits
No edit summary |
No edit summary |
||
Line 98: | Line 98: | ||
--Checks which math formula to use, based on how much of the date there is. | --Checks which math formula to use, based on how much of the date there is. | ||
if firstDate[4] == | if firstDate[4] == "year" or secondDate[4] == "year" or firstDate[4] == "month-year" or secondDate[4] == "month-year" or firstDate[2] <= secondDate[2] then | ||
age = math.floor(secondDate[3] - firstDate[3]) | age = math.floor(secondDate[3] - firstDate[3]) | ||
elseif firstDate[2] >= secondDate[2] then | elseif firstDate[2] >= secondDate[2] then |