perses icon indicating copy to clipboard operation
perses copied to clipboard

Currency value formatting

Open bripkens opened this issue 1 year ago • 2 comments

Proposal

Hey folks,

we have found that people want to have a formatter for currencies. This is a proposal to add this to the formatting system.

  • Proposed unit: currency-${currencyCode}, e.g., currency-usd or currency-jpy.
  • The currency code can then be placed neatly into the Intl.NumberFormat APIs (see docs)

The implementation is very similar to the one for decimals in the end. I'd be happy to contribute this part.

bripkens avatar Sep 04 '24 09:09 bripkens

ah interesting.

I guess that won't hurt to support it. I'm just wondering if it means we need to list every existing currency ?

Nexucis avatar Sep 04 '24 12:09 Nexucis

Eventually, the answer is probably "yes". Though I would suppose that a certain subset could be sufficient for now. Even a Grafana limits itself to a subset.

image

bripkens avatar Sep 05 '24 06:09 bripkens

Hey, @Nexucis , just gave this Issue a shot. :) Please let me know if I'm missing something in the process or any adaptions are still necessary.

Aurifi avatar Jul 27 '25 16:07 Aurifi