public
Description: Allows parsing and formatting of phone numbers
Homepage: http://phonenumber.rubyforge.org
Clone URL: git://github.com/norman/phonenumber.git
name age message
file .gitignore Thu Jan 29 07:33:33 -0800 2009 Initial commit [Norman Clarke]
file History.txt Fri Jan 30 11:59:40 -0800 2009 First significant commit. [Norman Clarke]
file Manifest.txt Thu Apr 16 09:59:19 -0700 2009 Improved Buenos Aires city phone number normali... [Norman Clarke]
file PostInstall.txt Thu Jan 29 07:33:33 -0800 2009 Initial commit [Norman Clarke]
file README.rdoc Fri Jan 30 12:41:21 -0800 2009 Added to docs. [Norman Clarke]
file Rakefile Thu Apr 16 09:59:19 -0700 2009 Improved Buenos Aires city phone number normali... [Norman Clarke]
directory config/ Thu Jan 29 07:33:33 -0800 2009 Initial commit [Norman Clarke]
file init.rb Fri Jan 30 11:59:40 -0800 2009 First significant commit. [Norman Clarke]
directory lib/ Thu Apr 16 12:08:22 -0700 2009 Improved support for AR cell numbers with no ar... [Norman Clarke]
directory test/ Thu Apr 16 12:08:22 -0700 2009 Improved support for AR cell numbers with no ar... [Norman Clarke]
README.rdoc

PhoneNumber

This library will eventually allow you to extract information from, and format phone numbers.

It is in an early alpha stage of development right now. Don’t use it! I’m actively hacking this and all sorts of stuff is likely to change.

At the moment, you can basically do this:

  pn = PhoneNumber.new("1-206-854-1224")
  pn.country_code # "1"
  pn.country # "US"
  pn.region # "WA"
  pn.area_code # 206
  pn.prefix # "854"
  pn.line_number # "1224"

International support is planned. I’ll be doing Argentina next, and would love help with creating "drivers" for other countries.

At the moment the extent of international support is this:

  pn = PhoneNumber.new("+54-11-4444-4444")
  pn.country_code # "54"
  pn.country # "AR"

Copyright © 2009 Norman Clarke

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.