Editing Module:Effective protection expiry
From Guild of Archivists
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 14: | Line 14: | ||
pagename = title.prefixedText | pagename = title.prefixedText | ||
if action == 'autoreview' then | if action == 'autoreview' then | ||
return 'unknown' | |||
return | |||
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then | 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 ) | error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) | ||
Line 25: | Line 24: | ||
return 'unknown' | return 'unknown' | ||
else | else | ||
local year, month, | local year = mw.ustring.sub( rawExpiry, 1, 4 ) | ||
local month = mw.ustring.sub( rawExpiry, 5, 6 ) | |||
) | local day = mw.ustring.sub( rawExpiry, 7, 8 ) | ||
return year .. '-' .. month .. '-' .. day | |||
end | end | ||
end | end |