Module:Sandbox/Hellknowz/Test: Difference between revisions

Content deleted Content added
huh? its already number
so can i just directly?
Line 36:
local input = args[1]
 
local matchDayday, matchMonth, matchYearyear = input:match('^([0-9][0-9]?) ([A-Za-z]+) ([0-9][0-9][0-9][0-9])$')
 
if (matchDay == nil) then return input .. ' -> is not a recognized pattern match' end
Line 45:
if (month == nil) then return input .. ' -> does not have a recognized month name' end
 
--local day = matchDay -- :tonumber() ???
--local year = matchYear
 
return input .. ' -> parsed to ' .. year .. '-' .. month .. '-' .. day; -- won't add 0s