Изменения
Перейти к навигации
Перейти к поиску
Строка 16:
Строка 16:
− +
Строка 125:
Строка 125:
−
− 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
Модуль:Надстрочное предупреждение (посмотреть исходный код)
Версия от 17:29, 16 мая 2023
, 2 года назадтест
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
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() )
return mTemplateInvocation.invocation( name, args )
return mTemplateInvocation.invocation( name, args )