Module:Sandbox/Ythlev/Notable world leaders

local p = {}

function main( args ) local gallery = mw.html.create( 'gallery' ) gallery :attr( 'widths', '125' ) :attr( 'heights', '125' ) :attr( 'perrow', '7') local decade = os.time( {year = tonumber(args[1]), month = 1, day = 1} ) list = mw.loadData('Module:Sandbox/Ythlev/Notable world leaders/list' ) for i, country in ipairs( list ) do		for i, leader in ipairs( country ) do			for i, v in ipairs( leader ) do				if v[1] == nil or os.difftime( os.time( {year = v[1], month = v[2], day = v[3]} ), decade ) >= 63158400 then a = gallery:tag( 'a' ) a:wikitext(v[4]) end end end end return tostring( gallery ) end

function p.main( frame ) return main( require( "Module:Arguments" ).getArgs( frame ) ) end

return p