Изменения

Перейти к навигации Перейти к поиску
тест
Строка 16: Строка 16:  
local dateString = year .. '-' .. month .. '-' .. day
 
local dateString = year .. '-' .. month .. '-' .. day
 
 
local success, result = pcall(mwLang.formatDate, mwLang, 'U', dateString)
+
local success, result = pcall( mwLang.formatDate, mwLang, 'U', dateString )
 
if success then
 
if success then
 
if tonumber( result ) then
 
if tonumber( result ) then
Строка 125: Строка 125:  
local mTemplateInvocation = require( 'Module:Template invocation' )
 
local mTemplateInvocation = require( 'Module:Template invocation' )
 
local name = mTemplateInvocation.name( frame:getParent():getTitle() )
 
local name = mTemplateInvocation.name( frame:getParent():getTitle() )
  −
local timestamp = mwLang:formatDate( 'd-m-Y' )
  −
local date = mw.text.split( timestamp, '-' )
  −
if isEmpty( args[ '2' ] ) then
  −
args[ '2' ] = date[ 1 ]
  −
end
  −
if isEmpty( args[ '3' ] ) then
  −
args[ '3' ] = date[ 2 ]
  −
end
  −
if isEmpty( args[ '4' ] ) then
  −
args[ '4' ] = date[ 3 ]
  −
end
   
 
 
return mTemplateInvocation.invocation( name, args )
 
return mTemplateInvocation.invocation( name, args )
Анонимный участник

Реклама:

Навигация