local cargo = mw.ext.cargo
local p = {}
local Functions = require('Module:Functions')
local getTeamLogo = Functions.getTeamLogo
local prizeToString = Functions.prizeToString
local timeUntil = Functions.timeUntil
function p.upcomingMatches(game)
local tables = 'AllMatches'
local fields = '_pageName, date, p1, p2, winner'
local currentDate = os.date('%Y-%m-%d')
local cargoArgs = {
where = '_pageName LIKE "' .. game .. '/%" AND ( date > "' .. currentDate .. '" OR winner=0)',
orderBy = 'date ASC',
limit = 10
}
local results = cargo.query(tables, fields, cargoArgs)
if #results > 0 then