Module:Release

local p = {}

local Region = require("Module:Region") local utilsTable = require("Module:UtilsTable")

function p.Main(frame) return frame:expandTemplate({		title = "Release/Legacy",		args = frame:getParent.args	}) end

local regionCodes = Region.enum regionCodes.reference = nil local params = {} for i, code in ipairs(regionCodes) do	params[code] = { type = "date", desc = "Release date in "..Region.getRegion(code).name, trim = true, nilIfEmpty = true, } end local countryCodes, multiCountryCodes = utilsTable.partition(regionCodes, function(str)	return str:len == 2 end) p.Templates = { ["Release"] = { format = "block", paramOrder = utilsTable.concat(countryCodes, multiCountryCodes), params = params, boilerplate = { tabs = { {					label = "Countries", params = countryCodes, },				{					label = "Multi-Country Regions", params = multiCountryCodes, },			}		}	} }

return p