View source for Module:Election box US auto
MyWikiBiz, Author Your Legacy — Tuesday July 08, 2025
Jump to navigationJump to searchYou do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p = {}
local mYesno = require('Module:Yesno')
-- a global per #invoke
local linked_write_in = false
function formatnum( num )
-- simple wrapper
local lang = mw.getContentLanguage()
return lang:formatNum( num )
end
function percent( part, total )
if total >= 1000000 then
-- if > 1 million votes, then round to 2 decimals
round_to = 2
else
round_to = 1
end
local ret = mw.ext.ParserFunctions.expr( "" .. 100 * part / total .. " round " .. round_to )
if not string.find( ret, ".", 1, true ) then
-- add the decimals that expr doesn't
000
1:0
Templates used on this page:
Return to Module:Election box US auto.