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

Italy phone numbers with 2 digit NDCs will not format correctly #33

Closed
bekki opened this issue Jan 24, 2012 · 5 comments
Closed

Italy phone numbers with 2 digit NDCs will not format correctly #33

bekki opened this issue Jan 24, 2012 · 5 comments

Comments

@bekki
Copy link
Contributor

bekki commented Jan 24, 2012

A number like "390612345678" will not format correctly. The last digit will be dropped and the formatted number will end up looking like this: "+39 06 123 4567"

The problem is in the last handler defined in phony/countries/italy.rb. The local splitter there will split the number into three digits and then four, dropping off the last digit. This works just fine for 3 or more digit NDCs obviously. :)

@floere
Copy link
Owner

floere commented Jan 24, 2012

Thanks for reporting! Inclined to fix it and send a pull request? :)

On 24.01.2012, at 15:05, Bekki Hui Jamreply@reply.github.com wrote:

A number like "390612345678" will not format correctly. The last digit will be dropped and the formatted number will end up looking like this: "+39 06 123 4567"

The problem is in the last handler defined in phony/countries/italy.rb. The local splitter there will split the number into three digits and then four, dropping off the last digit. This works just fine for 3 or more digit NDCs obviously. :)


Reply to this email directly or view it on GitHub:
#33

@bekki
Copy link
Contributor Author

bekki commented Jan 24, 2012

Will do!

@floere
Copy link
Owner

floere commented Jan 24, 2012

Thank you, Bekki!

@floere
Copy link
Owner

floere commented Jan 25, 2012

@PixelVixen Ok, pulled your request. Thanks very much for participating!

As a note for the future: The countries specs are in spec/lib/phony/countries_spec.rb and can be run with rake spec after a bundle install. Cheers!

Will release 1.6.2 in the next half hour.

@floere
Copy link
Owner

floere commented Jan 25, 2012

Phony 1.6.2 is released, also see contributors https://github.com/floere/phony/wiki/Contributors. Thanks! :)

@floere floere closed this as completed Jan 25, 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

No branches or pull requests

2 participants