Modul:ArtikelDesTages: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
local p = {} | local p = {} | ||
local artikel = { | |||
"Saison 2017/18", | |||
"Saison 2018/19", | |||
"Saison 2019/20", | |||
"Saison 2020/21", | |||
"Saison 2021/22", | |||
"Saison 2022/23", | |||
"Saison 2023/24", | |||
"Saison 2024/25", | |||
"Saison 2025/26" | |||
} | |||
function p.main(frame) | function p.main(frame) | ||
return " | |||
local tag = tonumber(frame:preprocess("{{CURRENTDAY}}")) | |||
local monat = tonumber(frame:preprocess("{{CURRENTMONTH}}")) | |||
local jahr = tonumber(frame:preprocess("{{CURRENTYEAR}}")) | |||
local wert = jahr * 10000 + monat * 100 + tag | |||
local index = (wert % #artikel) + 1 | |||
local titel = artikel[index] | |||
return "[[" .. titel .. "|" .. titel .. "]]" | |||
end | end | ||
return p | return p | ||