Giter Club home page Giter Club logo

Comments (4)

floere avatar floere commented on August 16, 2024

Hi Fred

Thanks for asking.
Phony only works with numbers that are in the E164 Format (see more here: http://floere.github.com/phony/e164.html), meaning that it needs the country code.

Even though the given number is a valid US number, since phony should be working for all international numbers, it has no way of knowing it is a US number.

So what it needs is the country code for the US (and Canada), 1, to be working correctly.
So if you give it "001 (310) 897-8881" it will return "13108978881", the normalized E164 representation of an international phone number which you then can split, or format, should you want that.

Hope that helped. Cheers
Florian

from phony.

floere avatar floere commented on August 16, 2024

P.S: #normalize works also with numbers that are not E164 normalized, but has all numbers necessary to be able to normalize it to a E164 normal representation.

from phony.

fredlee avatar fredlee commented on August 16, 2024

Ok. Thanks.

from phony.

floere avatar floere commented on August 16, 2024

My pleasure :)

from phony.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.