Modul:Effective protection expiry
![Documentation icon](http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
local p = {}-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.-- If no title is specified, the title of the page being displayed is used.function p._main(action, pagename)local titleif type(pagename) == 'table' and pagename.prefixedText thentitle = pagenameelseif pagename thentitle = mw.title.new(pagename)elsetitle = mw.title.getCurrentTitle()endpagename = title.prefixedTextif action == 'autoreview' thenlocal stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)return stabilitySettings and stabilitySettings.expiry or 'unknown'elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' thenerror( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )endlocal rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)if rawExpiry == 'infinity' thenreturn 'infinity'elseif rawExpiry == '' thenreturn 'unknown'elselocal year, month, day, hour, minute, second = rawExpiry:match('^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$')if year thenreturn string.format('%s-%s-%sT%s:%s:%s',year, month, day, hour, minute, second)elseerror('internal error in Module:Effective protection expiry; malformed expiry timestamp')endendendsetmetatable(p, { __index = function(t, k)return function(frame)return t._main(k, frame.args[1])endend })return p
🔥 Top keywords: ForsideHelle Sara PetersSpeciel:SøgningEM i fodbold (mænd)Kasper HjulmandArnela MuminovićKylian MbappéSpeciel:Seneste ændringerAntoine GriezmannMartin BrygmannMikael JalvingParadise Hotel (Danmark, sæson 8)Maurits KjærgaardRomelu LukakuElisabeth WæverSlovenienVM i fodbold (mænd)Europamesterskabet i fodbold 2024 (mænd)Tour de France 2023Morten HjulmandSlovakietDanmarks fodboldlandsholdViggo MortensenChristian EriksenJosefine HøghDanmarkEuropamesterskabet i fodbold 2020 (mænd)Carsten EskelundJens Stryger LarsenFemern Bælt-forbindelsenThomas GravesenOkapiClaes AntonsenFlemming PovlsenPhilip Patrick WesthLudvig von KahlenMetallicaFrankrigs fodboldlandsholdRalf Rangnick