Permalink
Browse files

+ added Seychelles, Sri Lanka

  • Loading branch information...
jcfischer authored and floere committed Dec 5, 2012
1 parent 1fe6d73 commit 9d1dd73fb40fce69865ced99b1bd0ae95e852743
Showing with 10 additions and 3 deletions.
  1. +1 −1 README.textile
  2. +9 −2 lib/phony/countries.rb
View
@@ -13,7 +13,7 @@ This gem can normalize, format and split E164 numbers.
The (admittedly crazy) *goal* of this Gem is to be able to format/split all phone numbers in the world.
-Currently handles Abhas, Afghan, Algerian, Austrian, Australian, Belgian, Brazilian, Cambodian, Chilean, Chinese, Croatian, Cuban, Cypriot, Czech, Danish, Dutch, Egyptian, Estonian, French, German, Ghanan, Gibraltar, Greek, Haiti, Hong Kong, Hungarian, Italian, Iran, Irish, Kazakh, Lithuanian, Luxembourgian, Malaysian, Malta, Mexican, Monaco, Morocco, New Zealand, Nigerian, Norwegian, Peruvian, Polish, Romanian, Russian, Rwandan, Singapore, Slovakian, South African, South Korean, South Osetian, Spanish, Sudan, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, Venezuelan, and Vietnamese numbers.
+Currently handles Abhas, Afghan, Algerian, Austrian, Australian, Belgian, Brazilian, Cambodian, Chilean, Chinese, Croatian, Cuban, Cypriot, Czech, Danish, Dutch, Egyptian, Estonian, French, German, Ghanan, Gibraltar, Greek, Haiti, Hong Kong, Hungarian, Italian, Iran, Irish, Kazakh, Lithuanian, Luxembourgian, Malaysian, Malta, Mexican, Monaco, Morocco, New Zealand, Nigerian, Norwegian, Peruvian, Polish, Romanian, Russian, Rwandan, Seychelles, Singapore, Slovakian, South African, South Korean, South Osetian, Spanish, Sri Lankan, Sudan, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, Venezuelan, and Vietnamese numbers.
And to some extent, all others. Just try if it works for you.
View
@@ -258,7 +258,10 @@
country '93', fixed(2) >> split(7), # Note: the document says 6, but the examples use 7.
validate_lengths(9)
- country '94', fixed(2) >> split(3,2,2) # TODO Sri Lanka (Democratic Socialist Republic of)
+ country '94', # TODO Sri Lanka (Democratic Socialist Republic of)
+ fixed(2) >> split(3,2,2),
+ validate_lengths(9)
+
country '95', fixed(2) >> split(3,2,2) # TODO Myanmar (Union of)
country '98', # Iran (Islamic Republic of)
@@ -322,7 +325,11 @@
country '245', todo # Guinea-Bissau
country '246', todo # Diego Garcia
country '247', none >> split(4), validate_lengths(4) # Ascension
- country '248', todo # Seychelles
+
+ country '248', # Seychelles
+ fixed(1) >> split(2,2,2),
+ validate_lengths(7)
+
country '249', fixed(2) >> split(3,4), validate_lengths(9) # Sudan
# Rwanda

0 comments on commit 9d1dd73

Please sign in to comment.