-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Change Money.toString() to show currency code at end #297
Comments
This is arguable and an implementation detail. We basically can do that change. I would also add a ticket to use default rounding based on the currency for formatting the amount as well. |
I's nothing for the API, even the style for formatting and everything else is currently part of the RI, not API. As this is a breaking change that affects all sorts of parse and serialization aspects (e.g. the JSON libraries) it must be done with great caution and enough notice for users to adopt. IMO it should be possible to configure e.g. in a |
The current solution (starting with this release) dies:
|
Please take a look on my comment #307 (comment) about the current solution. Here I talked exactly about the universal serialization form i.e. not about the localized format to display for users. What is the difference between 20$ and $20 Here is a discussion more about a tradition of the currency sign position in different countries. American dollar (symbol) (Linguistic recommendation from the Translation Bureau) Here is clearly said that in financial world the currency code is always in the end (as I proposed). Anyway, this should be specified in the specification so please reopen the task at least to keep a discussion and finalize the decision. |
Not sure if this should be discussed here or on API level but I wan't to propose to change behavior of
MonetaryAmount.toString()
methods. Currently they return a string when first is a currency code and then follows an amount i.e.USD 42.01
. But numbers are Arabic numbers i.e. written from right to left and should be right justified when rendered in tables so the currency code should be on the end.I added an example with Bitcoin to show that actually it should be aligned to point but for most cases it will be enough just to make a simple align to right.
So maybe in v2 we can change this behavior?
The text was updated successfully, but these errors were encountered: