Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method for formatting (possibly regional) phone numbers in an "absolute" international way. #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

taylorhughes
Copy link

Need this for the project I'm working on -- you enter 555-555-5555 and I actually want +15555555555 to send to the backend server so we can send a text message. Similarly if you're on a phone in Spain it should return +34555555555 for "555-555-555".

Let me know what you think ... happy to adjust the naming / whatever.

… international" (eg. "(555) 555-5555" -> "+15555555555") numbers by parsing according to the local/specified region and enforcing that the country code is attached at the beginning.
@alexandreroche
Copy link

This is great. Would love to see this pulled in.

@sogko
Copy link

sogko commented Dec 31, 2013

+1 for pull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants