You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library currently supports only the dot . as a decimal separator. Unfortunately there is not a standard for this (see here for example). The comma , for example, is also heavily used.
It would be nice to have some support from the library in regard to this. This issue falls under the umbrella of localization, which is quite tedious to implement, but some global variables could be enough.
This library currently supports only the dot
.
as a decimal separator. Unfortunately there is not a standard for this (see here for example). The comma,
for example, is also heavily used.It would be nice to have some support from the library in regard to this. This issue falls under the umbrella of localization, which is quite tedious to implement, but some global variables could be enough.
At the moment the dot is hard-coded here
decimal/decimal.go
Line 159 in f55dd56
It would be really easy to support others decimal separators by introducing a global variable
that users can change from outside, and use it there. Of course the code for formatting the number should also be modified.
Sometimes one wants to support different formats. At this point would be possible to also allow for several separators. For example
and
For the formatting, the first separator
DecimalSeparators[0]
could be used.What do you think? I would like to hear some opinion before (eventually) submitting a PR.
The text was updated successfully, but these errors were encountered: