مندرجات کا رخ کریں

ماڈیول:ملعب/Mr. Ibrahem/5

آزاد دائرۃ المعارف، ویکیپیڈیا سے
Documentation icon دستاویز [تخلیق]
local p ={}
function mathyears(yb, mb, db, yd, md, dd)
	yd = yd or os.date( "%Y" )
	md = md or os.date( "%m" )
	dd = dd or os.date( "%e" )
	function ma(f,s)
		if f < s 
			then return '1'
			elseif f == s then return '1'
			else return '0'
		end
	end
	function foo(f,s)
		if f < s 
			then return '1'
			else return '0'
		end
	end	
	if not foo(db,db) == '0' or not ma(md,mb) == '0'
		then vv = '1'
		else vv = '0'
	end
	val = (yd)-(yb)-(vv)
	return val
end

function p.test(frame)
			val= mathyears(
				frame.args['1']
				,frame.args['2']
				,frame.args['3']
				,frame.args['4']
				,frame.args['5']
				,frame.args['6']
				)
	return val
end
return p