Skip to content

Commit 0958fe7

Browse files
committed
Accept locale for currency calculation
1 parent 417fbcd commit 0958fe7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

web-app/packages/lib/src/common/number_utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ export function formatFileSize(
3939
export function formatToCurrency(
4040
value: number,
4141
currency: string,
42-
digits = 2
42+
digits = 2,
43+
locale = 'en-UK'
4344
): string {
44-
return value.toLocaleString('en-UK', {
45+
return value.toLocaleString(locale, {
4546
style: 'currency',
4647
currency,
4748
currencySign: 'accounting',

0 commit comments

Comments
 (0)