Module:Date Stuff: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 42: Line 42:
   --This also allows us to add other calendars here
   --This also allows us to add other calendars here
   if calendar == "Solandria" then
   if calendar == "Solandria" then
     local monthNames = {"Miry", "Ozdary", "Rydust", "Iptust", "Tosey", "Iverly", "Eohe", "Kasgust", "Andust", "Bepry", "Nindust", "Tymust", "Ekage", "Aphly", "Asust", "Syranust"}
     monthNames = {"Miry", "Ozdary", "Rydust", "Iptust", "Tosey", "Iverly", "Eohe", "Kasgust", "Andust", "Bepry", "Nindust", "Tymust", "Ekage", "Aphly", "Asust", "Syranust"}
   elseif calendar == "Eberron" then
   elseif calendar == "Eberron" then
   local monthNames = {"Zarantyr", "Olarune", "Therendor", "Eyre", "Dravago", "Nymm", "Lharvion", "Barrakas", "Rhann", "Sypheros", "Aryth", "Vult"}
   monthNames = {"Zarantyr", "Olarune", "Therendor", "Eyre", "Dravago", "Nymm", "Lharvion", "Barrakas", "Rhann", "Sypheros", "Aryth", "Vult"}
   elseif calendar == "Forgotten Realms" then
   elseif calendar == "Forgotten Realms" then
   local monthNames = {"Hammer", "Alturiak", "Ches", "Tarsakh", "Mirtul", "Kythorn", "Flamerule", "Eleasis", "Eleint", "Marpenoth", "Uktar", "Nightal"}
   monthNames = {"Hammer", "Alturiak", "Ches", "Tarsakh", "Mirtul", "Kythorn", "Flamerule", "Eleasis", "Eleint", "Marpenoth", "Uktar", "Nightal"}
   elseif calendar == "IRL" then
   elseif calendar == "IRL" then
   local monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
   monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
   end
   end


Line 56: Line 56:
    
    
   if shortDate[2] == nil then
   if shortDate[2] == nil then
     local dateTable = {nil, nil, nil, tonumber(shortDate[1]), "year"}
     dateTable = {nil, nil, nil, tonumber(shortDate[1]), "year"}
   elseif shortDate[3] == nil then
   elseif shortDate[3] == nil then
     local dateTable = {monthNames[tonumber(shortDate[1])], tonumber(shortDate[1]), nil, tonumber(shortDate[2]), "month-year"}
     dateTable = {monthNames[tonumber(shortDate[1])], tonumber(shortDate[1]), nil, tonumber(shortDate[2]), "month-year"}
   else
   else
     local dateTable = {monthNames[tonumber(shortDate[1])], tonumber(shortDate[1]), tonumber(shortDate[2]), tonumber(shortDate[3]), "month-day-year"}
     dateTable = {monthNames[tonumber(shortDate[1])], tonumber(shortDate[1]), tonumber(shortDate[2]), tonumber(shortDate[3]), "month-day-year"}
   end
   end
   return dateTable
   return dateTable