Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore commas when sorting by currency #47

Closed
wants to merge 1 commit into from

Conversation

dougjohnston
Copy link

When sorting by currency, ignore commas for a proper sort. Fixes issue #43.

@Mottie
Copy link
Collaborator

Mottie commented Oct 21, 2014

This change is not a good idea... some countries use the comma and decimal point the opposite of how it is used in the U.S. (e.g. € 2.156,33 or € 2 324 156,33).

@dougjohnston
Copy link
Author

Fair point. For our project, we only deal in USD, so it wasn't something I thought of. Would there be a more suitable fix that accommodates more countries? The current sorting approach (not ignoring commas) doesn't work for columns of currency values. Eg:

$1,995
$1,495
$1,795

@dougjohnston
Copy link
Author

I see now that this is a duplicate of #34. That one seems like a better fix because the comma is not hard-coded and the value is configurable. That seems to solve the issue you brought up, no?

@Mottie
Copy link
Collaborator

Mottie commented Oct 22, 2014

Yeah, I left a comment in that issue on how I solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants