Skip to content
#

currency

Here are 728 public repositories matching this topic...

jonasesr
jonasesr commented Dec 4, 2019

Currently there is no possibility to set up a custom rounding function. Therefore you are limited to the ones that are implemented by default. For my case I need a rounding function that always rounds up (e.g. 0.002 => 0.01 with precision 2, commercial rounding)

It would be nice to pass a callback or a string that describes the rounding mode. If it is a string and the string matches the suppo

WulfP
WulfP commented Jan 7, 2019

Instead on Tab-out the original value ist restored.

suggested solution:

unformat (value) {
  var emptyString = typeof value === 'string' && value === ''
  value = parseFloat(value.replace ? value.replace(",",".") : value)
  const toUnformat = emptyString ? this.emptyValue : value
  return accounting.unformat(toUnformat, this.decimalSeparatorSymbol)
}

The condition

marschall
marschall commented Jan 6, 2019

The class comment of MonetaryAmountFormat has two code snippets. Both of them are full of compile errors

MonetaryAmountFormat f = MonetaryFormats.getInstance(loc);
f.setStyle(f.getStyle().toBuilder().setPattern("###.##;(###.##)").build());
  • there are no #setStyle and #getStyle methods
  • there is no #getInstance method on MonetaryFormats, you probably mean `#getAmount
framework
fulldecent
fulldecent commented Mar 13, 2019

Large integers, like 9999999999999999999999999 are valid in JSON files and are valid as data parts in the 0xcert conventions. However these numbers are currently not representable in JavaScript in full fidelity. This violates some guarantees made by (or assumptions you might make while using) the 0xcert Framework. Workarounds are available.

Discussion

These examples are running Safari Ver

ricardocanelas
ricardocanelas commented Sep 18, 2019

Version:

"react-dom": "^16.9.0",
"react": "^16.9.0",
"react-currency-input": "^1.3.6",

Warning message:

react-dom.development.js:12029 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're upda

Improve this page

Add a description, image, and links to the currency topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the currency topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.