Module:UpdateNumber

local p = {} local versionData = mw.loadData( 'Module:UpdateNumber/data' )

function p.getVersion(frame) local tArgs = frame:getParent if not(tArgs.args[1]) then tArgs = frame end

local versionNo = tArgs.args[1] local inclDate = (tArgs.args[2] and tArgs.args[2] ~= "") local txtOnly  = (tArgs.args[3] and tArgs.args[3] ~= "") local versionText

if versionData[versionNo] then versionText = versionData[versionNo][1] .. " Update"

if not txtOnly then versionText = "" .. versionText .. "" end

if inclDate then versionText = versionText .. " on " .. versionData[versionNo][2] end else versionText = "Unknown Version" end

return versionText end return p