Module:Date Stuff: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 73: Line 73:
   if firstDate[4] == 1 or secondDate[4] == 1 or firstDate[5] == 1 or secondDate[5] == 1 or firstDate[2] <= secondDate[2] then
   if firstDate[4] == 1 or secondDate[4] == 1 or firstDate[5] == 1 or secondDate[5] == 1 or firstDate[2] <= secondDate[2] then
     age = math.floor(secondDate[3] - firstDate[3])
     age = math.floor(secondDate[3] - firstDate[3])
    age = age - 1 .." - ".. age
   elseif firstDate[2] >= secondDate[2] then
   elseif firstDate[2] >= secondDate[2] then
     age = math.floor(secondDate[3] - firstDate[3] - 1)
     age = math.floor(secondDate[3] - firstDate[3] - 1)