Skip to content

Commit

Permalink
fix spacing issue with en-GB currency
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCassou authored and BenjaminVanRyseghem committed Dec 15, 2021
1 parent 5214ac4 commit cfbb950
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions languages/en-GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -52,7 +52,7 @@ module.exports = {
fullWithNoDecimals: {
output: "currency",
thousandSeparated: true,
spaceSeparated: true,
spaceSeparated: false,
mantissa: 0
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/languages/en-GB-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit cfbb950

Please sign in to comment.