4 ms·
Found this today whilst I was looking for a solution to standardised formatting of phone numbers. I was hoping for a ruby solution, but this is an extremely com
by kondro 16y ago
Found this today whilst I was looking for a solution to standardised formatting of phone numbers. I was hoping for a ruby solution, but this is an extremely complete library supporting formatting and validation for 228 countries/regions.
- robotron 16y ago"A direct port to Javascript is also available." Did you happen to notice where this is?
- tuxychandru 16y agoIt is in the SVN. README documents the usage. http://code.google.com/p/libphonenumber/source/browse/#svn%2Ftrunk%2Fjavascript http://code.google.com/p/libphonenumber/source/browse/#svn%2...
- bliving 16y ago"extremely complete library" I'm interested in how the completeness is defined, as the standards available are loose at best. I couldn't see by what measure they considered this work 'complete'. That complaint aside, it's a great effort to see. Now to test it out...
- davidradcliffe 16y agoHow much work would it take to make a complete ruby port?
- simon_kun 16y agoNot the answer you were looking for, but you could run the Java lib with JRuby, or use the JS lib with Ruby/V8 and "The Ruby Racer" (https://github.com/cowboyd/therubyracer https://github.com/cowboyd/therubyracer)
- kondro 16y agoWell... habermann24 (https://github.com/habermann24/libphonenumber-ruby https://github.com/habermann24/libphonenumber-ruby) looks like he's started on a ruby port and he also has his phoney library which doesn't appear to use the same dataset and doesn't work properly for Australia. I am planning on just using the Java version with JRuby - it will probably be faster than a pure ruby version anyway.
- bigfudge 16y agoOr python... I'm hacking together regexes for dealing with specific country formats in django right now... Is there a comparable python lib available?
- deleted 16y ago[deleted]
- g1smd 16y agoRuby port of libphonenumber... https://github.com/habermann24/libphonenumber-ruby/ https://github.com/habermann24/libphonenumber-ruby/