Modul: Statistik: Unterschied zwischen den Versionen
Aus MAV
MH (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
MH (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 4: | Zeile 4: | ||
function Statistik.Person(frame) | function Statistik.Person(frame) | ||
local | local birth = mw.smw.show('{{#show: ' .. frame.args[1] .. '|?Geburtsdatum }}') | ||
local death = mw.smw.show('{{#show: ' .. frame.args[1] .. '|?Sterbedatum }}') | |||
if birth == nil or death == nil then | |||
return 'Keine Auswertung möglich!' | |||
end | |||
return birth .. death | |||
end | end | ||
return Statistik | return Statistik | ||
Version vom 25. Februar 2025, 12:39 Uhr
Aufruf der Funktion
Bitte exakt nach folgendem Schema aufrufen:
{{#invoke:Statistik|Person|{{SUBPAGENAME}}|{{{Geburtsdatum|}}}}}
local Statistik = {}
-- Abgleich des Lebens einer Person mit anderen Statistiken
function Statistik.Person(frame)
local birth = mw.smw.show('{{#show: ' .. frame.args[1] .. '|?Geburtsdatum }}')
local death = mw.smw.show('{{#show: ' .. frame.args[1] .. '|?Sterbedatum }}')
if birth == nil or death == nil then
return 'Keine Auswertung möglich!'
end
return birth .. death
end
return Statistik