<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.juanweixianshe.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AEffective_protection_expiry</id>
	<title>模块:Effective protection expiry - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.juanweixianshe.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AEffective_protection_expiry"/>
	<link rel="alternate" type="text/html" href="https://wiki.juanweixianshe.com/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_expiry&amp;action=history"/>
	<updated>2026-04-11T15:23:32Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.juanweixianshe.com/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_expiry&amp;diff=184&amp;oldid=prev</id>
		<title>黯狐：导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://wiki.juanweixianshe.com/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_expiry&amp;diff=184&amp;oldid=prev"/>
		<updated>2021-08-04T09:34:55Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.&lt;br /&gt;
-- If no title is specified, the title of the page being displayed is used.&lt;br /&gt;
function p._main(action, pagename)&lt;br /&gt;
	local title&lt;br /&gt;
	if type(pagename) == 'table' and pagename.prefixedText then&lt;br /&gt;
		title = pagename&lt;br /&gt;
	elseif pagename then&lt;br /&gt;
		title = mw.title.new(pagename)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
	pagename = title.prefixedText&lt;br /&gt;
	if action == 'autoreview' then&lt;br /&gt;
		return 'unknown'&lt;br /&gt;
	elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then&lt;br /&gt;
		error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )&lt;br /&gt;
	end&lt;br /&gt;
	local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)&lt;br /&gt;
	if rawExpiry == 'infinity' then&lt;br /&gt;
		return 'infinity'&lt;br /&gt;
	elseif rawExpiry == '' then&lt;br /&gt;
		return 'unknown'&lt;br /&gt;
	else&lt;br /&gt;
		local year = mw.ustring.sub( rawExpiry, 1, 4 )&lt;br /&gt;
		local month = mw.ustring.sub( rawExpiry, 5, 6 )&lt;br /&gt;
		local day = mw.ustring.sub( rawExpiry, 7, 8 )&lt;br /&gt;
		return year .. '-' .. month .. '-' .. day&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
setmetatable(p, { __index = function(t, k)&lt;br /&gt;
	return function(frame)&lt;br /&gt;
		return t._main(k, frame.args[1])&lt;br /&gt;
	end&lt;br /&gt;
end })&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>黯狐</name></author>
	</entry>
</feed>