No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
if (args.start == nil or args.start < currentDate) and (args['end'] == nil or args['end'] > currentDate) then | if (args.start == nil or args.start < currentDate) and (args['end'] == nil or args['end'] > currentDate) then | ||
VariablesLua.vardefine( 'logoAll', args.logoAll ) | VariablesLua.vardefine( 'logoAll', args.logoAll or nil ) | ||
VariablesLua.vardefine( 'logoLight', args.logoLight ) | VariablesLua.vardefine( 'logoLight', args.logoLight or nil ) | ||
VariablesLua.vardefine( 'logoDark', args.logoDark ) | VariablesLua.vardefine( 'logoDark', args.logoDark or nil ) | ||
end | end | ||
Revision as of 19:22, 5 May 2023
Documentation for this module may be created at Module:Logos/doc
local getArgs = require('Module:Arguments').getArgs
VariablesLua = mw.ext.VariablesLua
local Logos = {}
function Logos.main(frame)
local args = getArgs(frame)
local enteredLogos = {}
local currentDate = os.date('%Y-%m-%d')
if (args.start == nil or args.start < currentDate) and (args['end'] == nil or args['end'] > currentDate) then
VariablesLua.vardefine( 'logoAll', args.logoAll or nil )
VariablesLua.vardefine( 'logoLight', args.logoLight or nil )
VariablesLua.vardefine( 'logoDark', args.logoDark or nil )
end
return 'yes'
end
return Logos