모듈:MultiBand

위키백과, 우리 모두의 백과사전.
require('strict')

local p = {}

function p.get(frame)
	
	local param_ko = {
	['연도'] = 'anno',
	}
	
	local pargs = frame:getParent().args
	local reqAnno = tonumber(pargs.anno) or (tonumber(os.date('%Y'))+1)
	local ret

	for n = 1, 50 do
		param_ko['연도' .. n] = 'anno' .. n
	end

	local function localname(parameter)
		return param_ko[parameter] or parameter
	end

	for n = 1, 50 do
		local anno = tonumber(pargs['anno' .. n]) or tonumber(pargs['연도' .. n])
		if anno then
			if reqAnno >= anno then
				ret = pargs[frame.args[1] .. n] or ret
			end
		else
			break
		end
	end

	return ret
end

return p