Modul:Chronik/Work: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 9: Zeile 9:
local daterange = frame.args[1]
local daterange = frame.args[1]
local text = frame.args[2] or ""
local text = frame.args[2] or ""
local nodate = frame.args[3]
local option = frame.args[3]
local thema = frame.args["Thema"] or "Ereignis"
local thema = frame.args["Thema"] or "Ereignis"
local year = nil
local year = nil
Zeile 16: Zeile 16:
end
end
local data = p.dateParser(daterange, year)
local data = p.dateParser(daterange, year)
local ds = '[[' .. data['Starttag'] .. ']]'  
local ds = '[[' .. data['Starttag'] .. ']]'
if not year then
if not year then
ds = ds .. ' [[' .. data['Startjahr'] ..']]'
ds = ds .. ' [[' .. data['Startjahr'] .. ']]'
end
end
if data['Enddatum'] then
if data['Enddatum'] then
Zeile 26: Zeile 26:
end
end
end
end
data['Beschreibung'] = text
data['Beschreibung'] = text
data['Thema'] = thema
data['Thema'] = thema
mw.smw.subobject(data)
mw.smw.subobject(data)
return ds .. ' ' .. text
if option == "nodate" then
return text
end
return ds .. ': ' .. text
end
end


Zeile 48: Zeile 50:
data['Endtag'] = lsd.getMonthday(edf)
data['Endtag'] = lsd.getMonthday(edf)
end
end
mw.logObject(data)
return data
return data
end
end
82.367

Bearbeitungen