Изменения

Перейти к навигации Перейти к поиску
отмена правки 104498676 участника Carn (обс.)
Строка 3: Строка 3:  
local bool_to_number={ [true]=1, [false]=0 }
 
local bool_to_number={ [true]=1, [false]=0 }
 
local err = "-"
 
local err = "-"
local format = "j xg Y"
      
local function purif(str)
 
local function purif(str)
Строка 102: Строка 101:  
     return dateout
 
     return dateout
 
end
 
end
  −
local function date2txt(datein,format)
  −
if not isdate(datein) then return error("Some wrong date") end
  −
if format == nil then format = "j xg Y" end
  −
textout = "(" .. lang:formatDate(format,datein,true) .. ")"
  −
return textout
  −
end
  −
  −
-- if (not isdate(jdate)) or (not isdate(gdate)) then return error("Some wrong date") end
      
function gri2jd( datein )
 
function gri2jd( datein )
Строка 304: Строка 294:  
end
 
end
   −
-- =p.testo(mw.getCurrentFrame():newChild{title="-",args={["year"]=2020,["month"]=2,["day"]=20}})
+
return p
-- =p.testo(mw.getCurrentFrame():newChild{title="-",args={"20.02.2020"})
  −
function p.TeSto( frame )
  −
    local args = getArgs(frame, { frameOnly = true })
  −
    local strin = args[1]
  −
    local datein = numstr2date(strin)
  −
    local txtout = date2txt(datein)
  −
    return txtout
  −
end
 
Анонимный участник

Реклама:

Навигация