Module:Date Stuff: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 66: Line 66:


--Writes that date based on what is given.
--Writes that date based on what is given.
function writeDate(date)
function writeDate(dateTable)
   if date[5] == "year" then
   if dateTable[5] == "year" then
     return date[4]
     return dateTable[4]
   elseif date[5] == "month-year" then
   elseif dateTable[5] == "month-year" then
     return date[1].." ("..date[2]..") "..date[4]
     return dateTable[1].." ("..dateTable[2]..") "..dateTable[4]
   elseif date[4] == "month-day-year" then
   elseif dateTable[4] == "month-day-year" then
     return date[1].." ("..date[2]..") "..date[3]..", "..date[4]
     return dateTable[1].." ("..dateTable[2]..") "..dateTable[3]..", "..dateTable[4]
   end
   end
end
end