Njuškii siskáldâsân

Mooduul:Ordine data

Wikipedia:st
[ mute ]

Šoddâd Myenster:Ordine data

Algâalgâlâš:


require('strict')

local p = {}

function p.main(frame)
	local ret
	local args = {}

	for k, v in pairs(frame:getParent().args) do
		v = mw.text.trim(v)
		if v ~= '' then
			args[k] = v
		end
	end

	if args[2] or not args[1] then return args[2] end

	if mw.ustring.match(args[1], "^%[*%d*%]*$") then
		ret = "1/1/" .. args[1]
	elseif mw.ustring.match(args[1], "^%a") then
		ret = "1 " .. args[1]
	else
		ret = mw.ustring.gsub(args[1], "[º°]", "")
	end

	ret = mw.ustring.gsub(ret, "[%[%]]", "")

	return ret
end

return p