Modul:Archivbot

aus Wikipedia, der freien Enzyklopädie
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