יחידה:גיל לערכי אישים: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מ פרמטר "מציין" לתת משהו במקום "בן"/"בת"
שורה 58: שורה 58:
function ageCalc(frame)
function ageCalc(frame)
local args = Arguments.getArgs(frame, { ['trim'] = true, ['removeBlanks'] = true })
local args = Arguments.getArgs(frame, { ['trim'] = true, ['removeBlanks'] = true })
local age_string = args['מציין']
local BirthDateStr = args['תאריך לידה']
local BirthDateStr = args['תאריך לידה']
local DeathDateStr = args['תאריך פטירה']
local DeathDateStr = args['תאריך פטירה']
שורה 112: שורה 113:
else
else
prefix = frame:expandTemplate{ title = 'לפי מגדר/בדוק', args = { 'בן ', 'בת ' } }  
if (age_string) then
prefix = age_string..' '
else
prefix = frame:expandTemplate{ title = 'לפי מגדר/בדוק', args = { 'בן ', 'בת ' } }  
end
end
end