From cfbb95017d46288a1000988a535a64d0f0cf240c Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Wed, 15 Dec 2021 14:15:02 +0100 Subject: [PATCH] fix spacing issue with en-GB currency --- CHANGELOG.md | 1 + languages/en-GB.js | 10 +++++----- tests/languages/en-GB-tests.js | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da297110..5e9b3d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Next +- Fix spacing issue with en-GB currency. Thanks @DamienCassou - Fix #507: mantissa precision produces wrong results for certain numbers. Thanks @swissmanu ### 2.3.5 diff --git a/languages/en-GB.js b/languages/en-GB.js index 1ef5daec..1e4521c0 100644 --- a/languages/en-GB.js +++ b/languages/en-GB.js @@ -29,20 +29,20 @@ module.exports = { currencyFormat: { thousandSeparated: true, totalLength: 4, - spaceSeparated: true, - spaceSeparatedCurrency: true, + spaceSeparated: false, + spaceSeparatedCurrency: false, average: true }, formats: { fourDigits: { totalLength: 4, - spaceSeparated: true, + spaceSeparated: false, average: true }, fullWithTwoDecimals: { output: "currency", thousandSeparated: true, - spaceSeparated: true, + spaceSeparated: false, mantissa: 2 }, fullWithTwoDecimalsNoCurrency: { @@ -52,7 +52,7 @@ module.exports = { fullWithNoDecimals: { output: "currency", thousandSeparated: true, - spaceSeparated: true, + spaceSeparated: false, mantissa: 0 } } diff --git a/tests/languages/en-GB-tests.js b/tests/languages/en-GB-tests.js index 977fd75c..cf9d96c0 100644 --- a/tests/languages/en-GB-tests.js +++ b/tests/languages/en-GB-tests.js @@ -38,7 +38,7 @@ describe("en-GB", () => { it("formats currency correctly", () => { let data = [ - [1000.234, "$", "£ 1.000 k"], + [1000.234, "$", "£1.000k"], [1000.234, "$0,0.00", "£1,000.23"], [-1000.234, "($0,0)", "£(1,000.234)"], [-1000.234, "$0.00", "-£1000.23"],