github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

norman / phonenumber

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 16
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Allows parsing and formatting of phone numbers — Read more

  cancel

http://phonenumber.rubyforge.org

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Improved support for AR cell numbers with no area code. Fixed support for 
AR 
Norman Clarke (author)
Thu Apr 16 10:59:49 -0700 2009
commit  639299826c936ded56a41c747f982449d30fc638
tree    8eb10ac200f4072c2cfa7eab20acdf114c7f73f5
parent  cd7e8106411455dc3f8db35beb6a06d05a82d48e
phonenumber /
name age
history
message
file .gitignore Loading commit data...
file History.txt
file Manifest.txt
file PostInstall.txt
file README.rdoc
file Rakefile
directory config/
file init.rb
directory lib/
directory test/
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.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server