Module:Transclusion count: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
m (move comment)
(Make argument 2 optional)
Line 42: Line 42:
-- Round and insert "apprxomimately" or "+" when appropriate
-- Round and insert "apprxomimately" or "+" when appropriate
if frame.args[2] == "yes" then
if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then
-- Round down
-- Round down
return_value = mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) .. "+"
return_value = mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) .. "+"