Questions tagged [format-currency]
14 questions
16
votes
2 answers
Missing locale data for the locale "de-DE"
I'm using Angular 9
In one of my components, I'm using Currency Formatting as bellow:
import { formatCurrency } from '@angular/common';
formatCurrency(23456, 'de-DE', '$')
Here, if I pass de-DE as culture, I'm getting error as below:
Missing…

Unknown Coder
- 1,510
- 2
- 28
- 56
4
votes
1 answer
Have I found a bug in PHP's NumberFormatter's "formatCurrency" function?
I happen to know for a fact how the "SEK" (Swedish money) currency is supposed to be formatted in "SE" (Sweden) locale with "sv" (Swedish) language. It's supposed to be using periods for thousands separators. However, the following minimal code…
user12760574
3
votes
1 answer
Babel formatting error for negative values in currency
I try to format floats into currency-strings with babel. The following code:
from babel.numbers import format_currency
print(format_currency(value, 'CHF', locale='de_CH'))
print(format_currency(value, 'CHF', '¤¤ #,##0.00',…

user2828408
- 65
- 1
- 2
- 6
2
votes
1 answer
formatCurrency in DT::renderDataTable when datatable has no columns
I'm using renderDataTable in my shiny app to display the contents of a data.table vals$content4table which is a reactiveValues.
It can happen that the vals$content4table is equal to a datatable with no columns.
In that case i have an error while…

Mario
- 137
- 1
- 10
2
votes
1 answer
FormatCurrency is not a function
I am trying to convert textbox value on onblur event to a $ currency using jquery.formatCurrency-1.4.0.js and my javascript function looks as follows :
$(document).ready(function()
{
$('.currency').blur(function()
{
…

Munny
- 67
- 1
- 10
1
vote
1 answer
PHP NumberFormatter, formatCurrency method rounds number for Serbian dinar
PHP NumberFormatter, formatCurrency method rounds numbers for Serbian dinar, but it works fine for other locales and currencies like Poland, Russia, and Turkey for instance.
echo (new NumberFormatter('sr_RS',NumberFormatter::CURRENCY))
…

Amin Behravesh
- 374
- 5
- 15
1
vote
1 answer
How to format currencies on MAKE.com using a number as input
I have an automation where I am getting numbers as an input and it is plain number without any formating
Example
3500
15000
55000
300
Here is a screenshot on how it looks on MAKE
Make screenshot
These numbers are actually currencies (US) and I want…

Fahad Sheji
- 25
- 4
1
vote
1 answer
Convert a number to currency format in Angular 10
I am using Angular 10 and imported the CurrencyPipe from '@angular/common' and based on the suggestions found, I implemented the following in the template -
{{Amount | currency}}
This shows the amount value in $ and with commas like expected…
shravs
- 21
- 1
- 5
1
vote
0 answers
Problem with DT export data to excel after formatCurrency(mark = ' ')
I use simple code of app.R.
When I launch it on my local machine and export table by xls - it's ok.
By when I launch it on server and do the same - all numeric columns are characters in xls. There are error "the number in this cell is formatted as…

Sergey Kalashnik
- 11
- 2
1
vote
1 answer
Why does PHP give me a fatal error for sending the (according to the manual) correct arguments to NumberFormatter's format()?
From the manual at: https://www.php.net/manual/en/numberformatter.format.php
public NumberFormatter::format ( int|float $value , int $type = ? ) : string
This code:
$a = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY);
$string =…

user15080516
- 121
- 5
0
votes
2 answers
How to format currency with input in reactjs
I want to format currency as 1,456,567.545
and here is my code
export const formatCurrencyNumberWithDecimal = (value) => {
if(value){
const cleanedValue = value.replace(/,/g, ''); // Remove existing commas
const parts =…

Sun
- 33
- 4
0
votes
1 answer
Jest defaults to format currency to "en-US" even when the window navigator language is mocked to be "en-GB"
I have a test file and am testing for the formatCurrency function. The problem, even though I've mocked window.navigator.language to be en-GB my function in test doesn't format the currency in £. In the UI it works as expected, but in jest looks…

Jose
- 99
- 1
- 8
0
votes
0 answers
How to apply currency format on specific rows in R
I would like to apply format Currency to row 3 and 4 of this sample data frame.
Is it possible to do it by row? I know there are functions (such as DT::formatCurrency) that can do it by column.
Thanks in advance!
Dataset:
A <- c(100, 7, 10000,…

Ketty
- 811
- 10
- 21
-1
votes
1 answer
How to add the results of a case
I am trying to display the results of this case and format the total amount in currency. However, It's not working and I am not quite sure why? Could someone please take a look at my code and tell me if you see what my eyes cannot. I just need a…

Victor
- 9
- 8