Изменения

Перейти к навигации Перейти к поиску
fix
Строка 14: Строка 14:  
local success, result = pcall(mwLang.formatDate, mwLang, 'U', dateString)
 
local success, result = pcall(mwLang.formatDate, mwLang, 'U', dateString)
 
if success then
 
if success then
result = tonumber( result )
+
if tonumber( result ) then
if result then
   
return result
 
return result
 
end
 
end
Строка 95: Строка 94:  
local mDate = require( 'Module:Date' )._Date
 
local mDate = require( 'Module:Date' )._Date
 
local today = mwLang:formatDate( 'Y-m-d H:i:s' )
 
local today = mwLang:formatDate( 'Y-m-d H:i:s' )
local input = mwLang:formatDate( 'Y-m-d H:i:s', tostring( date ) )
+
local input = mwLang:formatDate( 'Y-m-d H:i:s', date )
 
local diff = ( mDate( today ) - mDate( input ) )
 
local diff = ( mDate( today ) - mDate( input ) )
 
 
Анонимный участник

Реклама:

Навигация