אונטערשייד צווישן ווערסיעס פון "יחידה:תבנית מידע/אישיות"

גענצליך בלויז אין איין +
ק (הגהה)
(גענצליך בלויז אין איין + )
שורה 213: שורה 213:
if genBirthDate == nil and templateArgs['תאריך לידה עברי'] ~= nil then
if genBirthDate == nil and templateArgs['תאריך לידה עברי'] ~= nil then
local l = frame:preprocess(templateArgs['תאריך לידה עברי']) -- preprocess, to handle {{לינק צו אידיש יאר}}
local l = frame:preprocess(templateArgs['תאריך לידה עברי']) -- preprocess, to handle {{לינק צו אידיש יאר}}
if (#mw.text.split(l, '%s' ) == 1 or count(l, "%[%[") == 1) then --most probably just year or yearlink
if (#mw.text.split(l, '%s' ) == 1 or string.match(l, "^%[%[.-%]%]$") ~= nil) then --most probably just year or yearlink
if #mw.text.split(l, '%s' ) > 1 then
if #mw.text.split(l, '%s' ) > 1 then
l = l:match("%[%[.-|(.*)%]%]")
l = l:match("%[%[.-|(.*)%]%]")
שורה 232: שורה 232:
if genDeathDate == nil and templateArgs['תאריך פטירה עברי'] ~= nil then
if genDeathDate == nil and templateArgs['תאריך פטירה עברי'] ~= nil then
local p = frame:preprocess(templateArgs['תאריך פטירה עברי']) -- preprocess, to handle {{לינק צו אידיש יאר}}
local p = frame:preprocess(templateArgs['תאריך פטירה עברי']) -- preprocess, to handle {{לינק צו אידיש יאר}}
if (#mw.text.split(p, '%s' ) == 1 or count(p, "%[%[") == 1) then --most probably just year or yearlink
if (#mw.text.split(p, '%s' ) == 1 or string.match(p, "^%[%[.-%]%]$") ~= nil) then --most probably just year or yearlink
if #mw.text.split(p, '%s' ) > 1 then
if #mw.text.split(p, '%s' ) > 1 then
p = p:match("%[%[.-|(.*)%]%]")
p = p:match("%[%[.-|(.*)%]%]")