Module:FRCalendar

local FRCalendar = {} --- imported libraries -- Parses invocation and template parameters, trims whitespace, and removes blanks. local getArgs = require('Dev:Arguments').getArgs -- Smarter boolean logic local yesno = require( 'Dev:Yesno' ) -- Hash table of 2400 year names. local getYearName = require ('Module:Years').yearName

function FRCalendar.test( frame ) local args = getArgs(frame) local FRdate = args[1] local FRyear = tonumber(args[2]) local daysSinceLeap = frame:expandTemplate({title = 'Date number', args = {FRdate, FRyear}}) local output = mw.html.create('div'):addClass('RoMcontainer') :tag('div'):addClass('RoMtop'):done :tag('div'):addClass('RoMcenter') :tag('div'):addClass('RoMmiddle') :tag('table'):addClass('rollOfMonths') :tag('tr') :tag('th'):attr('colspan','10') --               if getYearName(FRyear) == '' then --                   output:wikitext('Calendar of Harptos') --               else :wikitext(getYearName(FRyear)) --               end :done :done :tag('tr') :tag('th'):attr('colspan','10') :wikitext(''..FRyear..' DR') :done :done :tag('tr') for i = 1, 10 do               output:tag('td'):wikitext(..tostring(i)..):done end output:done :done :done :done :tag('div'):addClass('RoMbottom'):done :allDone return tostring(output) end

return FRCalendar