Skip to content

Adds support for Republic of Ireland phone number formatting #36

Merged
merged 2 commits into from Feb 27, 2012

2 participants

@stevenyan

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
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
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

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
Owner
floere commented Feb 27, 2012

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

@stevenyan

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
Owner
floere commented Feb 27, 2012

Thanks!

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

@floere
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
Something went wrong with that request. Please try again.