Questions tagged [currency-formatting]

Currency is a system of monetary units in common use. Their numeric representation may vary between nations. The Currency formatting is the act to transform a numeric input into the locale currency expected output which must include the currency symbol, the correct amount of decimals and the appropriate decimal and digit separators.

311 questions
86
votes
8 answers

html5 input for money/currency

I seem unable to work out what to use for accepting monetary values on a form. I have tried... But that then won't allow for pence entries. I…
1DMF
  • 1,625
  • 3
  • 13
  • 16
61
votes
5 answers

Set value to currency in

I am trying to format a number input by the user into currency using javascript. This works fine on . However, on I cannot seem to be able to set the value to anything that contains non-numeric values.…
Danny
  • 6,838
  • 8
  • 40
  • 65
41
votes
4 answers

How to format the currency in HTML5 with thymeleaf

I am stuck with formatting the currency in HTML 5. I have application where I have to format the currency. I have below code snippet $ [[${abc.value}]] Where from DAO abc I am reading the…
giri
  • 24,958
  • 61
  • 134
  • 175
23
votes
9 answers

Format numbers with million (M) and billion (B) suffixes

I have large numbers, e.g. currency or dollar: 1 6,000,000 2 75,000,400 3 743,450,000 4 340,000 5 4,300,000 I want to format them using suffixes, like M (million) and B (billion): 1 6.0 M 2 75.0 M 3 743.5 M 4 0.3 M 5 4.3 M
emehex
  • 7,082
  • 8
  • 46
  • 85
13
votes
5 answers

need space between currency symbol and amount

I'm trying to print INR format currency like this: NumberFormat fmt = NumberFormat.getCurrencyInstance(); fmt.setCurrency(Currency.getInstance("INR")); fmt.format(30382.50); shows Rs30,382.50, but in India its written as Rs. 30,382.50(see…
Seeker
  • 887
  • 1
  • 8
  • 19
13
votes
1 answer

NSNumberFormatter currency symbol

My application is allowing user to select various currencies for spendings tracking. I have a label which displays the amount with currecy symbol. I'm using NSNumberFormatter with kCFNumberFormatterCurrencyStyle to format the amount string and…
kas-kad
  • 3,567
  • 23
  • 43
12
votes
5 answers

currency format in laravel

I am using currency format in lots of places in my blade files. I am using number_format to show a proper currency format. So it looks like this

${{ number_format($row->nCashInitialBalance, 2) }}

// $1,123.00

${{…

Johnny
  • 206
  • 1
  • 2
  • 10
11
votes
2 answers

Parse currency into numbers in Python

I just learnt from Format numbers as currency in Python that the Python module babel provides babel.numbers.format_currency to format numbers as currency. For instance, from babel.numbers import format_currency s = format_currency(123456.789,…
SparkAndShine
  • 14,337
  • 17
  • 76
  • 119
11
votes
1 answer

Convert Number to Words in Indian currency format with paise value

Using PHP how to convert number to Indian currency word format with paise (decimal value) Input 190908100.25 Output we need nineteen crores nine lakh eight thousand one hundred Rupees .two five Paise I expect this conversion method in core php .
Sakthi Karthik
  • 2,684
  • 2
  • 22
  • 28
10
votes
2 answers

Format numbers as currency in Python

I learn from Currency formatting in Python, use the locale module to format numbers as currency. For instance, #! /usr/bin/env python # -*- coding: utf-8 -*- import locale value = 123456789 l = locale.setlocale(locale.LC_ALL, '') #…
SparkAndShine
  • 14,337
  • 17
  • 76
  • 119
9
votes
2 answers

Highcharts y axis thousands separator

How to add a thousands separator to the Y Axis of Highcharts? This is what I have: yAxis: [{ // Primary yAxis labels: {
9
votes
12 answers

How to convert decimal number to words (money format) using PHP?

I just need a little help here. Because I am creating a code for converting decimals to Money format in words. For example if I have this number '2143.45' the output should be 'two thousand one hundred forty three and forty-five cents' I found a…
Jerielle
  • 5,994
  • 27
  • 75
  • 146
8
votes
4 answers

how to achieve currency type Input in angular 5?

I want following thing to happen in my angular 5 application. I am having text box where i am inputting numeric values, as soon as focus of that text box is lost, Numeric values i entered should be formatted to currency with '$' and ',','.'…
Harsha Bhat
  • 167
  • 1
  • 3
  • 9
8
votes
2 answers

Hot to get user’s regional settings for currency in JavaScript or jQuery?

I’m trying to format some numbers with jQuery. I would like to get the user’s regional settings for currency and number, in order to implement the correct format (obtain the decimal separator). Is it possible to retrieve these parameters with jQuery…
8
votes
3 answers

NSNumberFormatter : Show 'k' instead of ',000' in large numbers?

I'd like to change my large numbers from 100,000 to $100K if this is possible. This is what I have so far: let valueFormatter = NSNumberFormatter() valueFormatter.locale = NSLocale.currentLocale() valueFormatter.numberStyle =…
Dan Beaulieu
  • 17,926
  • 15
  • 92
  • 126
1
2 3
20 21