Module:Date Stuff: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 12: Line 12:


--Takes a short date and converts it to a long date (12-18-392 to Tymust 18, 392)
--Takes a short date and converts it to a long date (12-18-392 to Tymust 18, 392)
function p.solandria(date)
function p.solandria(date2)
   --Splits the date
   --Splits the date
   date = Split(date, "-")
   date2 = Split(date2, "-")
   --Saves the parts of the date into month day year variables
   --Saves the parts of the date into month day year variables
   month = tonumber(date[1])
   month = tonumber(date2[1])
   day = date[2]
   day = date2[2]
   year = date[3]
   year = date2[3]
    
    
   --Takes the month variable and converts it to its text counterpart
   --Takes the month variable and converts it to its text counterpart
Line 58: Line 58:


   --Takes the text month variable and adds it to the day and year variable with a comma
   --Takes the text month variable and adds it to the day and year variable with a comma
   date = month.." "..day..", "..year
   date2 = month.." "..day..", "..year
   return date
   return date2
end
end