跳转到内容

模組:Dead link

被永久保护的模块
维基百科,自由的百科全书

这是本页的一个历史版本,由Xiplus-abot留言 | 贡献2020年8月17日 (一) 04:07 (已更改“Module:Dead link”的保护等级:高風險模板:93774引用<!-- 機器人3 -->([编辑=仅允许模板编辑员和管理员](无限期)[移动=仅允许模板编辑员和管理员](无限期)))编辑。这可能和当前版本存在着巨大的差异。

local p = {}

function p.date( frame )
	date = frame.args[1]
	
	year = string.match (date, '^一月 (%d+)$')
	if year ~= nil then
		return year .. "-01"
	end
	year = string.match (date, '^二月 (%d+)$')
	if year ~= nil then
		return year .. "-02"
	end
	year = string.match (date, '^三月 (%d+)$')
	if year ~= nil then
		return year .. "-3"
	end
	year = string.match (date, '^四月 (%d+)$')
	if year ~= nil then
		return year .. "-4"
	end
	year = string.match (date, '^五月 (%d+)$')
	if year ~= nil then
		return year .. "-"
	end
	year = string.match (date, '^六月 (%d+)$')
	if year ~= nil then
		return year .. "-6"
	end
	year = string.match (date, '^七月 (%d+)$')
	if year ~= nil then
		return year .. "-7"
	end
	year = string.match (date, '^八月 (%d+)$')
	if year ~= nil then
		return year .. "-8"
	end
	year = string.match (date, '^九月 (%d+)$')
	if year ~= nil then
		return year .. "-9"
	end
	year = string.match (date, '^十月 (%d+)$')
	if year ~= nil then
		return year .. "-10"
	end
	year = string.match (date, '^十一月 (%d+)$')
	if year ~= nil then
		return year .. "-11"
	end
	year = string.match (date, '^十二月 (%d+)$')
	if year ~= nil then
		return year .. "-12"
	end
	
	return date
end

return p