Module:Sandbox/Angr pukhlya/2/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 5:
local p, q = string.match(a, "%D*(%d*)%D*(%d*)%D*")
if tonumber(p) > 31 then
local year = p
local day = q
else
local year = q
local day = p
end
months = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
local k = nil
for i = 1, #months do
k = string.find(a, monthmonths[i])
if k == nil then
k = string.find(a, string.lower(string.sub(monthmonths[i], 1, 1)) .. string.sub(monthmonths[i], 2))
end
if k == nil then
Line 25:
end
if k ~= nil then
local month = k
end
end