82.367
Bearbeitungen
(Änderung 733495 von Stiefelknecht (Diskussion) rückgängig gemacht.) Markierung: Rückgängigmachung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 13: | Zeile 13: | ||
end | end | ||
function p. | function p.IstJahrestag(frame) | ||
-- #invoke wrapper | |||
local args = frame.args | local args = frame.args | ||
local title = mw.title.getCurrentTitle().text | local title = mw.title.getCurrentTitle().text | ||
local tag, monat = p. | local tag, monat = p.istJahrestag(title) | ||
if tag and monat then | if tag and monat then | ||
| Zeile 25: | Zeile 26: | ||
end | end | ||
function p. | function p.istJahrestag(s) | ||
s = s or "" | s = s or "" | ||
-- Prüfe auf ein-/zweistellige Zahl durch Punkt gefolgt, opt. Leerzeichen | -- Prüfe auf ein-/zweistellige Zahl durch Punkt gefolgt, opt. Leerzeichen | ||
| Zeile 31: | Zeile 32: | ||
end | end | ||
function p. | function p.IstJahreszahl(frame) | ||
-- #invoke wrapper | |||
local args = frame.args | local args = frame.args | ||
local title = mw.title.getCurrentTitle().text | local title = mw.title.getCurrentTitle().text | ||
if p. | if p.istJahreszahl(title) then | ||
return args[1] or "true" | return args[1] or "true" | ||
else | else | ||
| Zeile 42: | Zeile 44: | ||
end | end | ||
function p. | function p.istJahreszahl(s) | ||
s = s or "" | s = s or "" | ||
-- Prüfe auf Formate wie: 2024, -44, 44 v. Chr., 800 n. Chr. | -- Prüfe auf Formate wie: 2024, -44, 44 v. Chr., 800 n. Chr. | ||