Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch

Modul: Dokumentation

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


local p = { }

p.getdomain = function ( frame )
    local url = frame.args[1]
    local domain
    if url:match( "^https?://[%w%-%.]*/" ) then
        domain = url:match( "^https?://[%w%-%.]*" ):gsub("http://", ""):gsub("https://", ""):gsub("www.", "")
    else
        domain = "Fehler"
    end
    return domain or ""
end -- p.getdomain

p.archiveis = function ( frame )
    local timestamp = frame.args[1]
    local date
    if timestamp:match( "^20[0-9][0-9]%.[0-1][0-9]%.[0-3][0-9]%-[0-2][0-9][0-5][0-9][0-5][0-9]" ) then
        date = timestamp:match( "^20[0-9][0-9]%.[0-1][0-9]%.[0-3][0-9]%-[0-2][0-9][0-5][0-9][0-5][0-9]" ):gsub("%-", ""):gsub("%.", "")
    else
        date = timestamp
    end
    return date or ""
end

return p
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy