Skip to content

Commit

Permalink
Merge pull request floere#22 from joren/master.
Browse files Browse the repository at this point in the history
I have added some more Belgian ndcs codes
  • Loading branch information
floere committed May 2, 2011
2 parents b730671 + a54ea4c commit 6a1b8f7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions lib/phony/countries/belgium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,44 @@
'3', # Antwerpen (Antwerp), Sint-Niklaas
'4', # Liège (Luik), Voeren (Fourons)
'9', # Gent (Ghent/Gand)
'15',# Mechelen
'16',# Leuven
'67',# Ath
'53',# Aalst
'63',# Arlon
'50',# Brugge
'71',# Charleroi
'60',# Chimay
'83',# Ciney
'52',# Dendermonde
'13',# Diest
'82',# Dinant
'86',# Durbuy
'89',# Genk
'11',# Hasselt
'14',# Herentals
'85',# Huy (Hoei)
'57',# Ieper
'56',# Kortrijk
'64',# La Louvière
'61',# Libramont
'65',# Mons (Bergen)
'81',# Namur (Namen)
'58',# Nieuwpoort
'54',# Ninove
'67',# Nivelles (Nijvel)
'59',# Oostende
'51',# Roeselare
'55',# Ronse
'80',# Stavelot
'12',# Tongeren
'69',# Tounai
'14',# Turnhout
'87',# Verviers
'58',# Veurne
'19',# Wareme
'10',# Wavre (Waver)
'50',# Zeebrugge
]

mobile_regex = /^(4[789]\d)\d{6}$/ # Mobistar, Base, Proximus
Expand Down
1 change: 1 addition & 0 deletions spec/lib/phony/countries_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
Phony.split('3295551914').should == ['32', '9', '555', '1914'] # Gent
Phony.split('3245551414').should == ['32', '4', '555', '1414'] # Liège
Phony.split('32475279584').should == ['32', '475', '279584'] # mobile
Phony.split('3216473200').should == ['32', '16', '473', '200'] # Leuven
end
it 'handles brazilian numbers' do
Phony.split('551112341234').should == ['55', '11', '1234', '1234']
Expand Down

0 comments on commit 6a1b8f7

Please sign in to comment.