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:newTemplateParserValue({title = 'Date number', args = {FRdate, FRyear}}) local title = getYearName(FRyear) == '' and 'Calendar of Harptos' or getYearName(FRyear) local output = mw.html.create('div'):addClass('RoMcontainer') :tag('div'):addClass('RoMtop'):wikitext(''):done :tag('div'):addClass('RoMcenter') :tag('div'):addClass('RoMmiddle') :tag('table'):addClass('rollOfMonths') :tag('tr') :tag('th'):attr('colspan','10') :wikitext(title) :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'):wikitext(''):done :allDone return tostring(output) end

return FRCalendar