Zum Inhalt springen

Modul:Archivbot

Us der alemannische Wikipedia, der freie Dialäkt-Enzyklopedy
Version vu 8. Oktober 2021, 06:32 Uhr vu Holder (Diskussion | Byträg) (Die Syte isch nöi erstellt worde: local p = { } p.getdate = function ( frame ) local stamp = frame.args[1] local date if stamp:match( "^20[12]%d%-[0-1]%d%-[0-3]%d" ) then date = stamp:match("^20[12]%d%-[0-1]%d") else date = "ohne Datum" end return date or "" end -- p.getdate return p)
(Unterschid) ← Vorderi Version | Itzigi Version (Unterschid) | Nächschti Version → (Unterschid)

Die Dokumentation für dieses Modul kann unter Modul:Archivbot/Doku erstellt werden

local p = { }

p.getdate = function ( frame )
    local stamp = frame.args[1]
    local date
    if stamp:match( "^20[12]%d%-[0-1]%d%-[0-3]%d" ) then
        date = stamp:match("^20[12]%d%-[0-1]%d")
    else
        date = "ohne Datum"
    end
    return date or ""
end -- p.getdate

return p