Comments (5)
Thanks for reporting! Inclined to fix it and send a pull request? :)
On 24.01.2012, at 15:05, Bekki Hui [email protected] wrote:
A number like "390612345678" will not format correctly. The last digit will be dropped and the formatted number will end up looking like this: "+39 06 123 4567"
The problem is in the last handler defined in phony/countries/italy.rb. The local splitter there will split the number into three digits and then four, dropping off the last digit. This works just fine for 3 or more digit NDCs obviously. :)
Reply to this email directly or view it on GitHub:
#33
from phony.
Will do!
from phony.
Thank you, Bekki!
from phony.
@PixelVixen Ok, pulled your request. Thanks very much for participating!
As a note for the future: The countries specs are in spec/lib/phony/countries_spec.rb
and can be run with rake spec
after a bundle install
. Cheers!
Will release 1.6.2 in the next half hour.
from phony.
Phony 1.6.2 is released, also see contributors https://github.com/floere/phony/wiki/Contributors. Thanks! :)
from phony.
Related Issues (20)
- Incomplete detection of Nigerian phone numbers HOT 1
- Phony.plausible? returns false for a valid Gabon number HOT 1
- Phony.plausible? returns false for a valid Belgian mobile phone number HOT 4
- warning: Capturing the given block using Proc.new is deprecated; use `&block` instead HOT 2
- Phony.normalize('6502001382') returns '652001382' -- '0' was lost HOT 1
- Phony.plausible? returns false for a valid Belgian phone number HOT 2
- Numbering plan of Cote d'Ivoire/Ivory Coast has changed HOT 1
- Handle country codes for countries related to the united states with area code part of the country calling code +1-xxx HOT 3
- Globaltel Serbia phone numbers are not plausible
- Phony plausible? returns false for 3 digit locals with 3 digit NDC (German Numbers) HOT 5
- `false` is being inserted into formatted phone number, when no NDC is being used HOT 3
- Mauritan number definition does split but normalize HOT 3
- Samoa valid number that starts with "71" was not validated HOT 3
- Phony.plausible? returns false for valid Columbian numbers HOT 2
- Valid Italian phone number fails plausibility check HOT 2
- Proposal for "no RAM" mode HOT 4
- Nine digits Brazilian cellphone numbers HOT 2
- Dial code not added when the phone number has just the leading 00 but no actual dial code. HOT 2
- Valid Italian Landline numbers fails plausibility check HOT 1
- Validations failing for Vietnamese number HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phony.