Module:Logos

From TwogPedia
Revision as of 19:22, 5 May 2023 by Couchor (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
		if args.logoAll then VariablesLua.vardefine( 'logoAll', args.logoAll ) end
		if args.logoLight then VariablesLua.vardefine( 'logoLight', args.logoLight ) end
		if args.logoDark then VariablesLua.vardefine( 'logoDark', args.logoDark ) end
	end

	return 'yes'
end

return Logos