Re: [paymentrequest] Currency Specification (#18)

If using strings, note that different locales will use different decimal separators (comma vs decimal dot), as well as other possible formatting. This might be confusing if, e.g. a German price string like "567,89" is displayed to an American user.

The value is an arbitrary precision number expressed as a string, not a display value.

Javascript uses IEEE 754 64bit numbers, which allow for 15 digits of precision. For the sake of not complicating the spec, I'd say that's "good enough" for the vast majority of use cases that we are trying to address, no?

Extreme precision would only be significant for things like stock trading, but that sort of transactions are, as far as I understand, out of scope here.

We don't want to build something into the first version of the spec that will be broken for obvious future use cases. Micropayments, stock trading, etc. can all be solved with an arbitrary precision value that is expressed as a string. The spec would make sure to indicate that it is not a display value and implementations would validate properly.

—
Reply to this email directly or view it on GitHub <https://github.com/WICG/paymentrequest/issues/18#issuecomment-157131837>.

Received on Monday, 16 November 2015 19:44:30 UTC