Zum Inhalt springen

Modul:Archivbot

aus Wikipedia, der freien Enzyklopädie
Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch

Modul: Dokumentation

Diese Seite enthält Code in der Programmiersprache Lua. Einbindungszahl Cirrus


local p = { }

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