Module:Sandbox/Hellknowz/Test: Difference between revisions

Content deleted Content added
m hrmh
My
Line 41:
if (matchYear ~= nil) then
return nil, nil, tonumber(matchYear)
end
 
-- Try My
matchMonth, matchYear = input:match('^([A-Za-z]+) ([0-9][0-9][0-9][0-9])$')
 
if (matchMonth ~= nil) then
local month = monthIndices[matchMonth:lower()]
if (month == nil) then return nil end
 
return month, tonumber(matchYear)
end