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

Problem with normalizing Estonian number #187

Closed
zorar4ik opened this issue Oct 1, 2018 · 2 comments
Closed

Problem with normalizing Estonian number #187

zorar4ik opened this issue Oct 1, 2018 · 2 comments

Comments

@zorar4ik
Copy link

zorar4ik commented Oct 1, 2018

Greetings, I have met weird issue trying normalize 2 similar numbers. Quick example
phone1 = "0037253400030", phone2 = "0037275016183"
They are both have 13 chars and both start with '00372' which leads to EE country code (Estonia). However when I try normalize them:

[39] pry(main)> PhonyRails.normalize_number(phone1, country_code: 'EE')
=> "+37253400030"
[40] pry(main)> PhonyRails.normalize_number(phone2, country_code: 'EE')
=> "+37237275016183"

Am I missing something?

P.S I tried not to specify country code and I have got this result:

[42] pry(main)> PhonyRails.normalize_number(phone1) => "+37253400030";
[41] pry(main)> PhonyRails.normalize_number(phone2)   => "37275016183"
joost pushed a commit that referenced this issue Oct 11, 2018
@joost
Copy link
Owner

joost commented Oct 11, 2018

Seems it works already.

@zorar4ik
Copy link
Author

zorar4ik commented Jan 9, 2019

@joost hi again. Sorry for late response. I have updated gem to version 0.14.11 but it didn't help me.
roman$ bundle show phony_rails
/usr/local/bundle/gems/phony_rails-0.14.11
Same situation with normalizing:

[1] pry(main)> phone1 = "0037253400030"
=> "0037253400030"
[2] pry(main)> phone2 = "0037275016183" 
=> "0037275016183"
[3] pry(main)> PhonyRails.normalize_number(phone1, country_code: 'EE')
=> "+37253400030"
[4] pry(main)> PhonyRails.normalize_number(phone2, country_code: 'EE')
=> "+37237275016183"

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