mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
billing-helpers: Add commas to formatted amount.
This commit is contained in:
@@ -75,8 +75,10 @@ export function format_money(cents) {
|
||||
} else {
|
||||
precision = 2;
|
||||
}
|
||||
// TODO: Add commas for thousands, millions, etc.
|
||||
return (cents / 100).toFixed(precision);
|
||||
return new Intl.NumberFormat("en-US", {
|
||||
minimumFractionDigits: precision,
|
||||
maximumFractionDigits: precision,
|
||||
}).format((cents / 100).toFixed(precision));
|
||||
}
|
||||
|
||||
export function update_charged_amount(prices, schedule) {
|
||||
|
||||
Reference in New Issue
Block a user