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

unformat() should use the default decimal separator #43

Merged
merged 2 commits into from
May 31, 2012

Conversation

fmntf
Copy link
Contributor

@fmntf fmntf commented May 29, 2012

I think it is generally better to default to the decimal separator provided in the settings object instead of '.' for the unformat function.

This saves from calling accounting.unformat(v, accounting.settings.currency.decimal) a lot.

@wjcrowcroft
Copy link
Member

Hey, thanks for this, and I agree - the only issue being: why default to the currency decimal vs. the number decimal?

You assume they'd be the same, I imagine settings.number.decimal should be the accepted default

What do you think?

@fmntf
Copy link
Contributor Author

fmntf commented May 31, 2012

Yes, it makes sense. I used currency because I'm using accounting.js just to format/unformat currencies. But I think number is more appropriate.

@wjcrowcroft
Copy link
Member

Ok great, if you're able to change the file on your branch, I can
auto-merge it here!

@fmntf
Copy link
Contributor Author

fmntf commented May 31, 2012

I think it is complete now

@wjcrowcroft
Copy link
Member

Awesome! Thanks, merging now.

wjcrowcroft pushed a commit that referenced this pull request May 31, 2012
unformat() should use the default decimal separator via @fmntf
@wjcrowcroft wjcrowcroft merged commit d29a764 into openexchangerates:master May 31, 2012
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