Module:Effective protection expiry: Difference between revisions
return a yyyy-mm-ddThh:mm:ss timestamp, rather than just yyyy-mm-dd
(handles special pages) |
(return a yyyy-mm-ddThh:mm:ss timestamp, rather than just yyyy-mm-dd) |
||
Line 24: | Line 24: | ||
return 'unknown' | return 'unknown' | ||
else | else | ||
local year = | local year, month, day, hour, minute, second = rawExpiry:match( | ||
'^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' | |||
) | |||
return | if year then | ||
return 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') | |||
end | |||
end | end | ||
end | end |