Module:Logos

From TwogPedia
Revision as of 19:22, 5 May 2023 by Couchor (talk | contribs)

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