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

Adds support for Republic of Ireland phone number formatting #36

Merged
merged 2 commits into from
Feb 27, 2012

Conversation

stevenyan
Copy link
Contributor

Initial support for Republic of Ireland number formatting.

Irish NDCs are 2-3 digits in length, and the subscriber number length varies from 5-7 characters.

7 digit subscriber numbers are split 3-4.
5 and 6 digit subscriber numbers are not currently split, though I have seen some examples of splitting, it's inconsistent.

In the event that an NDC is not recognized, the NDC and subscriber number will not be split at all, e.g. +3530001234567 will be formatted as "+353 0001234567" so as to not assume a split.

@floere
Copy link
Owner

floere commented Feb 26, 2012

Fantastic, Steven, fantastic! :)

Many thanks for adding the Republic of Ireland to Phony's capabilities and for the explanations.

I will read, pull and release tomorrow. Thanks again!

@floere floere merged commit 368f619 into floere:master Feb 27, 2012
@floere
Copy link
Owner

floere commented Feb 27, 2012

I've just released 1.6.3 with your generous donation of Ireland! :) Please also see https://github.com/floere/phony/wiki/Contributors.

Note: I've had to change a spec regarding VoIP – I saw it was under the list with a 5-digit subscriber number and changed the spec accordingly. If this is wrong, please tell me.

@stevenyan
Copy link
Contributor Author

You're absolutely right, I think I was reordering some of the code and placed that in the wrong section. Thanks for catching that.

We use phony at Zendesk to handle number formatting for our Voice product: http://www.zendesk.com/product/features/voice. Thanks for providing this gem!

@floere
Copy link
Owner

floere commented Feb 27, 2012

My pleasure! Is it ok to add zendesk to the list of users in the README?

@stevenyan
Copy link
Contributor Author

Sorry Florian, I misunderstood you. +353 76 belongs to the list of 7-digit subscriber numbers, our Voice product allows provisioning of these and I know it's a 7 digit number. If you search online you can find other examples like on this page:

http://www.worldairops.com/contact.html

Yes, feel free to add Zendesk!

@floere
Copy link
Owner

floere commented Feb 27, 2012

Thanks!

Ok, I'll move it to the 7 digits list then and release again :)

@floere
Copy link
Owner

floere commented Feb 27, 2012

Version 1.6.4 is release, including the fix for VoIP numbers. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants