Closed eden-omb closed 2 years ago
Sorry about that, the docs were wrong. currency
is not one of the default formats, it's a custom one that can be added, but I've used in my apps for long that I forgot that's not built-in.
I'd updated the docs. Also, unless your app only ever uses one currency it's a bad idea to name your format "currency"
, it should be more specific. A common practice is to name your format as the three letter currency code of your supported currencies. The example now reflects that:
https://svelte-intl-precompile.com/en/docs/usage#formatting
I'm closing this as it was a documentation error. Let me know if I can be of further assistance
I'm trying to parse a number with the currency formatter as demonstrated here but getting the following error:
My code is as follows:
When I try to just do
$number(price)
instead it works out just fine.