sstephenson / global_phone Goto Github PK
View Code? Open in Web Editor NEWParse, validate, and format phone numbers in Ruby using Google's libphonenumber database
License: MIT License
Parse, validate, and format phone numbers in Ruby using Google's libphonenumber database
License: MIT License
2.2.0 :016 > number = GlobalPhone.parse "aaaaaaa"
=> #<GlobalPhone::Number territory=#<GlobalPhone::Territory country_code=1 name=US> national_string="2222222">
That is deeply weird. Anyone know why or have a fix?
i did a gem install of global_phone_dbgen, and it seems to pull down an old version of the generator code (with the old url). I'm can hack around that, but perhaps there's a bad pointer somewhere?
monty
Hi guys, this commit changes the remote URL.
Commit 7030736
I just installed the gem, bumped into the 404 and took a while to fix the issue.
Wanted to do a PR to help future users but realised it's already done.
Would be nice if you realise a bump for rubygems, so new users don't bump into this problem.
2.0.0-p247 :013 > GlobalPhone.parse('(201) 482-4764x1234')
=> nil
2.0.0-p247 :014 > GlobalPhone.parse('+12014824764x1234')
=> nil
2.0.0-p247 :015 > GlobalPhone.parse('+12014824764 ext. 1234')
=> nil
Firstly, thank you for great library, we use it actively at work to parse phone numbers.
There seems to be an issue with parsing phone numbers from Argentina.
Given a number, +54 11 4799 9350
, it should be formatted as +54 11 4799-9350
.
GlobalPhone.parse("+54 11 4799 9350") # +54 9 11 4799-9350
The extra 9 breaks the number because it is only supposed to be prefixed in front of mobile numbers. (Wikipedia)[http://en.wikipedia.org/wiki/Telephone_numbers_in_Argentina]
I generated the the JSON file just today, supposed it's not because of libphonenumber and also, Google's Javascript Demo returns the right number.
Would love to help if we can confirm this is some form of bug some pointers of where it might have gone wrong. It seems like the 9 is added in the method apply_national_prefix_format
@sstephenson, we've been eagerly awaiting updates on this outstanding gem, but its been 2 years now since the last release.
Totally understand if you're busy, but perhaps someone else (eg. someone at google) could pick up the mantle for your ruby port of the google library?
(https://github.com/googlei18n/libphonenumber/issues/704)
I'm not sure if this is an error in the nationalNumberPattern
node of the libphonenumber metadata, or if it has to do with global phone's parsing of the data, but the compiled territory data for Russia does not seem to allow for area codes starting with 7.
[
"7",
[
[
"(\\d{3})(\\d{2})(\\d{2})",
"$1-$2-$3",
"[1-79]",
"$FG",
"NA"
],
[
"([3489]\\d{2})(\\d{3})(\\d{2})(\\d{2})",
"$1 $2-$3-$4",
"[34689]"
],
[
"(7\\d{2})(\\d{3})(\\d{4})",
"$1 $2 $3",
"7"
]
],
[
[
"RU",
"\\d{10}",
"[3489]\\d{9}",
"$NP($FG)"
],
[
"KZ",
"\\d{10}",
"(?:33\\d|7\\d{2}|80[09])\\d{7}"
]
],
"810",
"8"
]
I'm looking at switching our phone number validation to global phone, but I have a few Russian phone numbers in our DB with area codes 705
, 701
, and 777
. A bit of Googling suggests that these are valid numbers and Twilio has has no issue sending to them.
If this is a libphonenumber issue, I can open an issue there.
/cc @josh
I have just installed you gem and when I try the global_phone_dbgen
command I get this 404 error.
I saw in a previous issue that it could be simply due to a bad URL, what should I do?
http://libphonenumber.googlecode.com/svn/trunk/javascript/i18n/phonenumbers/demo-compiled.html
Input: 911234567890, Default-Country: IN
Output: +91 1234 567 890
ph = GlobalPhone.parse('911234567890','IN')
ph.international_string = +91917893461643
No check, if country code added in case of without + sign.
The national_format
returns wrong results in many cases:
GlobalPhone.parse('+4372762580').national_format
=> "0727 62580"
(correct: 07276 2580)
GlobalPhone.parse('+49907896890').national_format
=> "090 7896890"
(correct: 09078 96890)
I think that the problem is not caused by wrong rules in the DB since libPhoneNumber-iOS yields correct results.
Looking for ideas to elegantly generate numbers that would pass a GlobalPhone.parse()
, faker uses formatters, but produces invalid numbers, in other words parse
would fail returning nil.
I have a twilio strange numbers in a hash and i need to check the incoming numbers against it.
In that, i could parse and check for equality for the UNKNOWN,BLOCKED & RESTRICTED by using the below code,
GlobalPhone.parse(twilio_strange_num).international_format == GlobalPhone.parse(incoming_number).international_format
The above condition is not working for ANONYMOUS Number 266696687 alone.
EMPTY number im handling seperately.
Please help me out and Suggest any other better approach to do this.
I just installed the gem and noticed that one of the examples in the wiki does not work as expected.
GlobalPhone.validate("(0) 20-7031-3000")
should return false
but it's returning nil
global_phone_dbgen > db/global_phone.json
/Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/common.rb:67: [BUG] Segmentation fault at 0x00000000000018
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
-- Control frame information -----------------------------------------------
c:0019 p:---- s:0089 e:000088 CFUNC :initialize
c:0018 p:---- s:0087 e:000086 CFUNC :new
c:0017 p:0075 s:0084 e:000081 METHOD /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/common.rb:67
c:0016 p:0070 s:0073 e:000071 CLASS /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext.rb:17
c:0015 p:0011 s:0070 e:000069 CLASS /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext.rb:12
c:0014 p:0056 s:0068 e:000067 TOP /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext.rb:9 [FINISH]
c:0013 p:---- s:0066 e:000065 CFUNC :require
c:0012 p:0113 s:0062 e:000061 METHOD /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54
c:0011 p:0019 s:0052 e:000051 CLASS /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json.rb:58
c:0010 p:0017 s:0050 e:000049 TOP /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json.rb:54 [FINISH]
c:0009 p:---- s:0048 e:000047 CFUNC :require
c:0008 p:0113 s:0044 e:000043 METHOD /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54
c:0007 p:0007 s:0034 e:000033 TOP /Users/herbyraynaud/.gem/gems/global_phone_dbgen-1.0.0/lib/global_phone/database_generator.rb:1 [FINISH]
c:0006 p:---- s:0032 e:000031 CFUNC :require
c:0005 p:0113 s:0028 e:000027 METHOD /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54
c:0004 p:0007 s:0018 e:000017 TOP /Users/herbyraynaud/.gem/gems/global_phone_dbgen-1.0.0/bin/global_phone_dbgen:2 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC :load
c:0002 p:0135 s:0006 E:002700 EVAL /Users/herbyraynaud/.gem/bin/global_phone_dbgen:23 [FINISH]
c:0001 p:0000 s:0002 E:002470 TOP [FINISH]
-- Ruby level backtrace information ----------------------------------------
/Users/herbyraynaud/.gem/bin/global_phone_dbgen:23:in <main>' /Users/herbyraynaud/.gem/bin/global_phone_dbgen:23:in
load'
/Users/herbyraynaud/.gem/gems/global_phone_dbgen-1.0.0/bin/global_phone_dbgen:2:in <top (required)>' /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' /Users/herbyraynaud/.gem/gems/global_phone_dbgen-1.0.0/lib/global_phone/database_generator.rb:1:in
<top (required)>'
/Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json.rb:54:in <top (required)>' /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json.rb:58:in
module:JSON'
/Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext.rb:9:in <top (required)>' /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext.rb:12:in
module:JSON'
/Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext.rb:17:in <module:Ext>' /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/common.rb:67:in
generator='
/Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/common.rb:67:in new' /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/common.rb:67:in
initialize'
-- Machine register context ------------------------------------------------
rax: 0x0000000000000008 rbx: 0x0000000000000008 rcx: 0x0000000000000008
rdx: 0x00007f9672c2d330 rdi: 0x0000000000000008 rsi: 0x0000000000a8110e
rbp: 0x00007fff5e3db830 rsp: 0x00007fff5e3db810 r8: 0x0000000000000001
r9: 0x0000000000000400 r10: 0x0000000000007000 r11: 0x0000000101890b90
r12: 0x0000000000000008 r13: 0x00007f967408c890 r14: 0x0000000000a8110e
r15: 0x00007f9672e4e8f0 rip: 0x0000000101890ba1 rfl: 0x0000000000010202
-- C level backtrace information -------------------------------------------
0 ruby 0x00000001019bcdfb rb_vm_bugreport + 155
1 ruby 0x00000001018613e0 rb_bug_context + 480
2 ruby 0x0000000101939743 sigsegv + 83
3 libsystem_platform.dylib 0x00007fff925b5f1a _sigtramp + 26
4 ruby 0x0000000101890ba1 rb_hash_aref + 17
5 ??? 0x0000000000a8110e 0x0 + 11014414
-- Other runtime information -----------------------------------------------
Loaded script: /Users/herbyraynaud/.gem/bin/global_phone_dbgen
Loaded features:
0 enumerator.so
1 rational.so
2 complex.so
3 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/enc/encdb.bundle
4 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/enc/trans/transdb.bundle
5 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/unicode_normalize.rb
6 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/rbconfig.rb
7 thread.rb
8 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/thread.bundle
9 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/compatibility.rb
10 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/defaults.rb
11 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/deprecate.rb
12 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/errors.rb
13 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/version.rb
14 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/requirement.rb
15 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/platform.rb
16 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/basic_specification.rb
17 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/stub_specification.rb
18 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/util/stringio.rb
19 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/specification.rb
20 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/exceptions.rb
21 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb
22 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/monitor.rb
23 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb
24 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems.rb
25 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/dependency.rb
26 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/path_support.rb
27 /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/version.rb
28 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/ostruct.rb
29 /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/generic_object.rb
30 /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/common.rb
31 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/enc/utf_16be.bundle
32 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/enc/utf_16le.bundle
33 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/enc/utf_32be.bundle
34 /Users/herbyraynaud/.rbenv/versions/2.2.1/lib/ruby/2.2.0/x86_64-darwin14/enc/utf_32le.bundle
35 /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext/parser.bundle
36 /Users/herbyraynaud/.gem/gems/json-1.8.2/lib/json/ext/generator.bundle
Hi, I see there's been a few commits by @eileencodes over the last two months. Mighty thanks for that!
Is there any plans to release a new version after these changes? It actually fixes an issue we had and we're pointing to master branch now, but I imagine we want to help to get a new version released.
Thanks.
by default global_phone_dbgen
Omit the filename argument to download and use the latest version of
Google's database from: http://libphonenumber.googlecode.com/svn/trunk/resources/PhoneNumberMetaData.xml
should be:
http://libphonenumber.googlecode.com/svn/trunk/resources/PhoneNumberMetadata.xml
There's a fairly serious bug in the db generator. Some of the elements have multiple children. When nodes.text
is called in text_or_nil they end up getting concatenated together, which obviously isn't correct. See Korea (KR) for an example. I don't have the full pull request but you can fix this by adding something like this to database_generator.rb:
def leadingDigits(node)
nodes = node.search("leadingDigits")
case nodes.length
when 0 # nop
when 1
nodes.text
else
nodes.map { |i| "(?:#{i.text)})" }.join("|")
end
end
Not sure if this is the fix you're looking for, but it's definitely an issue. I'm happy to put together a full pull request if there's interest in this fix.
This url http://libphonenumber.googlecode.com/svn/trunk/resources/PhoneNumberMetaData.xml
is not acceptable
I have 404
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.
Hi,
The latest gem version is 1.0.1 and the global_phone_dbgen
is not working for that version.
This is primarily because the link to PhoneNumber resource("http://libphonenumber.googlecode.com/svn/trunk/resources/PhoneNumberMetaData.xml") is returning 404 error.
It would be helpful, if a new version is released with the updated link to the resources.
Thanks.
Calling .to_json on a GlobalPhone::Number throws a CircularReferenceError. This is in Rails v4.0.5 with Ruby v.1.9.3.
1.9.3-p547 :001 > number = GlobalPhone.parse("6541238888")
=> #<GlobalPhone::Number territory=#<GlobalPhone::Territory country_code=1 name=US> national_string="6541238888">
1.9.3-p547 :002 > number.to_json
ActiveSupport::JSON::Encoding::CircularReferenceError: object references itself
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:79:in check_for_circular_references' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:49:in
encode'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in block in encode_json' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in
each'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in map' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in
encode_json'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:275:in block in encode_json' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:275:in
map'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:275:in encode_json' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:51:in
block in encode'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:81:in check_for_circular_references' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:49:in
encode'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in block in encode_json' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in
each'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in map' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in
encode_json'
... 9 levels...
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:49:in encode' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in
block in encode_json'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in each' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in
map'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:306:in encode_json' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:51:in
block in encode'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:81:in check_for_circular_references' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:49:in
encode'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/json/encoding.rb:34:in encode' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.0.5/lib/active_support/core_ext/object/to_json.rb:16:in
to_json'
from (irb):2
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.0.5/lib/rails/commands/console.rb:90:in start' from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.0.5/lib/rails/commands/console.rb:9:in
start'
from /Users/chris/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.0.5/lib/rails/commands.rb:62:in <top (required)>' from bin/rails:4:in
require'
from bin/rails:4:in `
The following happens to be true:
GlobalPhone.validate('+390dddddddddd')
An easy way to see this error happening is adding to this test case the following assertion (since its fixture was generated by global_phone_dbgen --test):
assert number.valid?, "expected #{string} be valid for territory #{territory_name}"
And looks like this error is happening because for some country codes the phone formats are missing.
I'm hoping to use the generated list of phones as fixture to my tests, but it would need to always have valid phone numbers generated.
Right now if you try and run the parse
method on a e164 number you get null. It would be helpful to be able to get the territory information from e164 numbers.
Hello,
I am facing Country code issue of Cameroon.
In past Cameroon has 237 Country code.
But in 2014 cameroon has added 6 after Country Code 237-6.
so now your API fails when check for Cameroon Phone Number.
number = GlobalPhone.parse('+237-6-95-22-95-11')
nil
number = GlobalPhone.parse('+237-95-22-95-11')
#<GlobalPhone::Number territory=#<GlobalPhone::Territory country_code=237 name=CM> national_string="95229511">**
Can anyone please Guide in this matter?
This commit is not showing up in either release 1.0.0 or 1.01. Because of which Http 404 error is thrown from global_phone_dbgen >> command.
Can you tag a new release with the above commit.
Regards,
John
Had to change 'd' to lower case in bin/global_phone_dbgen line 5
See discussion here:
google/libphonenumber#1704 (comment)
@sstephenson looks like global_phone was not updated for few years now. Perhaps you would be willing to add some collaborators who would keep the project alive and going?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.