Module:Dates2

months = { [1]={34,0,34,"Faneluin"}, [2]={25,34,59,"Anarlosse"}, [3]={34,59,93,"Edhealasse"}, [4]={32,93,125,"Rasaalu"}, [5]={31,125,156,"Anarkalina"}, [6]={33,156,189,"Urnulina"}, [7]={33,189,222,"Naurnaara"}, [8]={31,222,253,"Tyelcartel"}, [9]={30,253,283,"Ujeregula"}, [10]={32,283,315,"Eregamandil"}, [11]={31,315,346,"Moribel"}, [12]={30,346,376,"Randametta"} } function GetMonth(month) if month == months[1][4] then return 1 elseif month == months[2][4] then return 2 elseif month == months[3][4] then return 3 elseif month == months[4][4] then return 4 elseif month == months[5][4] then return 5 elseif month == months[6][4] then return 6 elseif month == months[7][4] then return 7 elseif month == months[8][4] then return 8 elseif month == months[9][4] then return 9 elseif month == months[10][4] then return 10 elseif month == months[11][4] then return 11 elseif month == months[12][4] then return 12 else return 0 end end local p={} function p.main(frame) years = tonumber(frame.args[1]) years = math.floor(years + 0.5) if tonumber(frame.args[2]) ~= nil then month = tonumber(frame.args[2]) else month = GetMonth(frame.args[2]) end if month < 1 then month = 1 end if month > 12 then month = 12 end month = math.floor(month + 0.5) days = tonumber(frame.args[3]) if tonumber(frame.args[3]) ~= nil then days = tonumber(frame.args[3]) else days = 0 end if days < 1 then days = 1 end if days > months[month][1] then days = months[month][1] end days = (days + months[month][2] + 0.5) + (years * 376) return days / 365.25 end return p