4,599
edits
No edit summary |
No edit summary |
||
Line 53: | Line 53: | ||
if date[2] == nil then | if date[2] == nil then | ||
date = {nil, nil, date[1], | date = {nil, nil, date[1], "year"} | ||
elseif date[3] == nil then | elseif date[3] == nil then | ||
date = {monthNames[tonumber(date[1])], nil, date[2], | date = {monthNames[tonumber(date[1])].." ("..date[1]..")", nil, date[2], "month-year"} | ||
else | else | ||
date = {monthNames[tonumber(date[1])], date[2], date[3], | date = {monthNames[tonumber(date[1])].." ("..date[1]..")", date[2], date[3], "month-day-year"} | ||
end | end | ||
Line 65: | Line 65: | ||
--Writes that date based on what is given. | --Writes that date based on what is given. | ||
function writeDate(date) | function writeDate(date) | ||
if date[4] == | if date[4] == "year" then | ||
return date[3] | return date[3] | ||
elseif date[ | elseif date[4] == "month-year" then | ||
return date[1].." "..date[3] | return date[1].." "..date[3] | ||
elseif date[4] == "month-day-year" then | |||
return date[1].." "..date[2]..", "..date[3] | return date[1].." "..date[2]..", "..date[3] | ||
end | end |