Open main menu

Changes

Module:Effective protection expiry

387 bytes added, 01:25, 10 September 2019
m
12 revisions imported
pagename = title.prefixedText
if action == 'autoreview' then
local 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' then
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)
local year if rawExpiry == mw.ustring.sub( 'infinity' then return 'infinity' elseif rawExpiry, 1, 4 )== '' then return 'unknown' else local year, month , day, hour, minute, second = mw.ustring.subrawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)( rawExpiry, 5, 6 %d%d)$' local day = mw.ustring.sub( rawExpiry, 7, 8 ) if year then return year .string. format( '%s-%s-%sT%s:%s:%s' .. , year, month .. , day, hour, minute, second ) else error('-internal error in Module:Effective protection expiry; malformed expiry timestamp' .. day) end end
end