FANDOM


local p = {}
 
local monthData = mw.loadData( 'Module:Month/data' )
local monthAliases = monthData[1]
local monthNumbers = monthData[2]
 
function p.trim( s, charset )
	if s == nil then
		return ''
	end
	charset = charset or '\t\r\n\f '
	s = mw.ustring.gsub( s, '^[' .. charset .. ']*(.-)[' .. charset .. ']*$', '%1' )
	return s
end
 
function p.month( frame )
	local month = p.trim( frame.args[1] )
	local monthAlias = monthAliases[string.lower( month )]
	if monthAlias ~= nil then
		return monthAlias
	end
	return month
end
 
function p._month( item )
	local month = p.trim( item )
	local monthAlias = monthAliases[string.lower( month )]
	if monthAlias ~= nil then
		return monthAlias
	end
	return month
end
 
function p.monthNo( frame )
	local month = p.trim( frame.args[1] )
	local monthNumber = monthNumbers[string.lower( month )]
	if monthNumber ~= nil then
		return monthNumber
	end
	return month
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on FANDOM

Random Wiki