Module:Age: Difference between revisions

Content deleted Content added
output nothing for Template:Birth_date_and_age + Template:Death_date_and_age if 'YYYY' is first parameter to avoid TemplateData auto value errors from Template:Infobox_musical_artist
add templateGeneric
Line 1,125:
end
return from_en(dateDifference(parms))
end
 
local function templateGeneric(frame)
local name = frame.args.template
if not name then
return message('mt-template-x')
end
return ageGeneric(frame:newChild{title = mw.title.new(name, 10), args = frame.args})
end
 
Line 1,136 ⟶ 1,144:
JULIANDAY = dateToJd, -- Template:JULIANDAY
time_interval = timeInterval, -- Template:Time_interval
[''] = templateGeneric -- same as age_generic, but can be invoked directly
}