Open ghost opened 10 years ago
Hmm, this is a very interesting issue. This is not a bug in dust-helper-intl
, it might be an bug in Intl polyfill, here is a repro case trying to illustrate the issue:
http://jsbin.com/fefapafe/2/edit
I tried that in chrome and firefox, and I see a consistent result, maybe I'm missing something, but I don't see the decimal output:
Native: 40000 -> $40,000
Native: 40000.00 -> $40,000
Polyfill: 40000 -> $40,000
Polyfill: 40000.00 -> $40,000
Can you double check this? How are you rendering this in dust?
Hmm, I'm increasingly thinking this is a server-side issue.
You should be able to repro if you take the /example
app and slightly alter the markup like so: https://git.corp.yahoo.com/gist/gaudick/6173.
/* 40000, currency, EUR */
Raw: 40000
Value: 40.000,00 €
Screenshot here, in case it helps: http://cl.ly/image/1p3w3e3g170m
Currency values seem to be uniformly returned in floating point notation. Is it possible to return a currency value in the same representation that it's passed in as? Or, at the least, allow for a notation option (
notation="integer"
)?Thanks :)