Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

recognizing Vatican, Kosovo, etc. #45

Open
mcr opened this issue Sep 7, 2016 · 0 comments
Open

recognizing Vatican, Kosovo, etc. #45

mcr opened this issue Sep 7, 2016 · 0 comments

Comments

@mcr
Copy link

mcr commented Sep 7, 2016

I realize that GlobalPhone seems to be more focused on formatting than lookup of number to country code, but it seems that it ignores info that has, for instance the "exception" for the Vatican it clearly knows about, but doesn't return. (Similar things would be for Kosovo and some other places)

2.1.5 :014 > number = GlobalPhone.parse('+390669822222')
 => #<GlobalPhone::Number territory=#<GlobalPhone::Territory country_code=39 name=IT> national_string="0669822222"> 
2.1.5 :015 > number.territory 
 => #<GlobalPhone::Territory country_code=39 name=IT> 
2.1.5 :016 > number.region   
 => #<GlobalPhone::Region country_code=39 territories=[IT,VA]> 
2.1.5 :017 > 

I think it ought to return name=VA for this, since clearly it knows about VA's use of an IT prefix.
I could write a test and fix this, but maybe it's not important enough for others. https://github.com/hemligabyran/calling_codes probably satisfies my needs, except I worry about it getting out of date.

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

No branches or pull requests

1 participant