Изменения
работающий вариант
end
end
-- =p.unitime(mw.getCurrentFrame():newChild{title="smth",args={"+1:30","1"}})
-- =p.unitime(mw.getCurrentFrame():newChild{title="smth",args={"−1:30","1"}})
function p.unitime( frame )
function p.unitime( frame )
elseif (string.sub(input:upper(),1,3) == 'UTC') and (string.len(input) < 10) then
elseif (string.sub(input:upper(),1,3) == 'UTC') and (string.len(input) < 10) then
utcin = string.sub(input,4)
utcin = string.sub(input,4)
else
if string.sub(input,1,1) == '['
or string.sub(input,1,1) == '{' then
-- or not (not input:find("[\192-\255]")) при наличии в строке юникода не работает
return input
-- elseif not string.find(string.upper(string.sub(input,1,1)),"[\65-\90]") or
-- not string.find(string.upper(string.sub(input,1,1)),"[\192-\223]") then
-- return input
else utcin = input end
end
-- elseif string.sub(input,1,3) ~= "−" then utcin = input
-- or not (not input:find("[А-я]")) при наличии в строке юникода не работает
local output = ""
local output = ""
if DST == 0 then output = utc(utcin)
if DST == 0 then output = utc(utcin)