Module:Effective protection expiry: Difference between revisions
Content added Content deleted
Enwikipedia>Cenarium No edit summary |
Enwikipedia>Cenarium No edit summary |
||
Line 1: | Line 1: | ||
local subString = require('Module:String').sub |
|||
local p = {} |
local p = {} |
||
Line 19: | Line 18: | ||
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 ) |
||
end |
end |
||
local |
local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) |
||
local year = mw.ustring.sub( rawExpiry, 1, 4 ) |
|||
return expiry |
|||
local month = mw.ustring.sub( rawExpiry, 5, 6 ) |
|||
local day = mw.ustring.sub( rawExpiry, 7, 8 ) |
|||
return year .. '-' .. month .. '-' .. day |
|||
end |
end |
||