יחידה:גיל לערכי אישים: הבדלים בין גרסאות בדף
מ הפעיל/ה הגנה על הדף "יחידה:גיל לערכי אישים": דף בשימוש רב ([עריכה=רק בדוקי עריכות אוטומטית מורשים] (בלתי מוגבלת בזמן) [העברה=רק בדוקי עריכות... |
מ טיפול בפעוטות |
||
| שורה 109: | שורה 109: | ||
local success, AgeYears = pcall(dateParser.age, BirthDate , DeathDate) | local success, AgeYears = pcall(dateParser.age, BirthDate , DeathDate) | ||
if success then | if success then | ||
result = prefix..tostring(AgeYears) | if AgeYears == 1 then | ||
result = prefix..'שנה' | |||
elseif AgeYears == 2 then | |||
result = prefix..'שנתיים' | |||
else | |||
result = prefix..tostring(AgeYears) | |||
end | |||
if AgeYears > 139 then | if AgeYears > 139 then | ||
table.insert(warnings, Errors['future-date']) | table.insert(warnings, Errors['future-date']) | ||