Module:Monsoonjr99

--Test

n = {}

function n.test(frame) local chars = mw.text.split(frame.args[1],'') return chars[2] .. chars[6] .. chars[7] end

function getDateNumsFromPageTitle local monthPageName = mw.title.getCurrentTitle.subpageText --'subpageText' temporarily for testing purposes; to be changed to 'rootText' local pageNameParts = mw.text.split(monthPageName,' ') local months = {January=1,February=2,March=3,April=4,May=5,June=6,July=7,August=8,September=9,October=10,November=11,December=12} local nums = {} nums[1] = months[pageNameParts[1]] nums[2] = tonumber(pageNameParts[2]) if nums[1]==nil or nums[2]==nil then nums = nil end return nums end

topSection = [=[

 the   month in  and  in Mapperdonia.

]=] --Needs to be lua-fied

function n.monthpage(frame) local dateNums = getDateNumsFromPageTitle if dateNums==nil then return "Error: Not a month page. " end return dateNums[1] .. '|' .. dateNums[2] .. ': ' .. frame.args[1] end

return n