Module:SelectServiceAward/sandbox explained

local p =

--A table with the edit requirements for each stage (descending order)local editreq =

--A table with the account age requirements for each stage (descending order)local edittime =

function p.main(frame) local numedits = tonumber(frame.args.edits) local date = frame.args.date local noincremental = frame.args.noinc local numpos = 0 local time = tonumber(frame:callParserFunction('#time', 'U')) for i=1, 37 do if numedits >= editreq[i] and numpos

0 then local timestr = date .. " + " .. edittime[i] local acctime = tonumber(frame:callParserFunction('#time', 'U', timestr)) if time >= acctime then numpos = (38 - i) end end end if noincremental

"yes" and numpos > 0 and numpos <= 20 then local counter = math.floor((numpos - 1) / 4) numpos = (4 * counter) + 1 end return (numpos)end

return p