daddyz/phonelib

001 country code

Opened this issue · 1 comments

>> number = Phonelib.parse(979543666330)
=> #<Phonelib::Phone:0x00007f91f7c3a8f8 @original="979543666330", @extension="", @sanitized="979543666330", @original_s="979543666330", @data={"001"=>{:id=>"001", :country_code=>"979", :national=>"543666330", :format=>{:pattern=>"(\\d)(\\d{4})(\\d{4})", :leading_digits=>"[1359]", :format=>"$1 $2 $3"}, :valid=>[:premium_rate], :possible=>[:premium_rate]}}, @national_number="543666330">
>> number.country
=> "001"

Expecting ISO2 code form country method

Prefix 979 is an international prefix. The info is here.
Might be I will change the method to return nil instead.