Module:Infobox interval: Difference between revisions

Godtone (talk | contribs)
Undo revision 171319 by TallKite (talk)
Tag: Undo
Godtone (talk | contribs)
Undo revision 171318 by TallKite (talk)
Tag: Undo
Line 172: Line 172:
end
end
if regular then
if regular then
-- a hundredth of a cent precision, and 3 significant figures if < 1¢
local sigFigs = 3
if cents >= 10 then sigFigs = 4 end
if cents >= 100 then sigFigs = 5 end
if cents >= 1000 then sigFigs = 6 end
table.insert(infobox_data, {
"Size in [[cent]]s",
utils._round(cents, sigFigs) .. "¢",
})
table.insert(infobox_data, {
table.insert(infobox_data, {
"Size in [[cent]]s",
"Size in [[cent]]s",