View source for Module:Coins2
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
local function amount(a)
-- convert used globals to locals where possible to improve performance
local math = math
local string = string
local table = table
local mw = mw
local expr = mw.ext.ParserFunctions.expr
-- strip commas from input
a = string.gsub(a, ',', '')
-- check for decimals/division to determine if output should have forced 2 decimal places
local has_decimal_or_division = false
if string.match(a, "[./]") then
has_decimal_or_division = true
end
-- for performance reasons, only calculate expr if required
000
1:0
Template used on this page:
Return to Module:Coins2.