num-format icon indicating copy to clipboard operation
num-format copied to clipboard

Accounting style negatives

Open Deedasmi opened this issue 5 years ago • 3 comments

I think this crate is great, and it massively simplifies some logic in my project while being much faster at it. But I’m working with financial data, where -$50 should be displayed $(50). The currency symbol is out of scope here of course.

I see the custom builder can specify a negative sign, but I don’t see a way to easily place the parentheses at the end.

I’m on mobile and just found this via week in Rust, so apologies if I missed it.

Deedasmi avatar Feb 20 '19 18:02 Deedasmi

Thanks! Accounting style (including the currency symbol) is something I'd like to eventually build functionality for, but it will probably take a lot of work. I think it's out-of-scope for me at least in the near-term, but longer-term I'd like to tackle it. Let's use this issue to track updates / progress.

bcmyers avatar Feb 20 '19 20:02 bcmyers

Related to #7.

bcmyers avatar Feb 20 '19 20:02 bcmyers

I’d say that currency information should be a separate crate built on top of this one. Keep this crate clean.

I could understand if parentheses denoting negatives is also held for that other crate, but being that’s it’s consistent across locals I figured it was okay here as a builder option.

Deedasmi avatar Feb 20 '19 20:02 Deedasmi