Module:Date Stuff: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 31: Line 31:
function Split(s, delimiter)
function Split(s, delimiter)
   result = {};
   result = {};
   for match in (s..delimiter):gmatch("(./)"..delimiter) do
   for match in (s..delimiter):gmatch("(.-)"..delimiter) do
     table.insert(result, match);
     table.insert(result, match);
   end
   end
Line 53: Line 53:
   --Takes the provided variable and seperates it out into a table
   --Takes the provided variable and seperates it out into a table
   --Also marks if it is only a year or a month and year
   --Also marks if it is only a year or a month and year
   local shortDate = Split(shortDate, "-")
   local shortDate = Split(shortDate, "/")
    
    
   if shortDate[2] == nil then
   if shortDate[2] == nil then

Navigation menu