DrHyde / perl-modules-Number-Phone

Number::Phone and friends
24 stars 32 forks source link

Format numbers without leading digits pattern. #16

Closed theory closed 10 years ago

theory commented 10 years ago

Based on code in libphonenumber, it looks like if there are no leading digits to match, then the whole pattern has to match the number. So we collect all patterns, even with no leading digits pattern, and format according to the first that matches the whole number if there is no leading digits pattern.

This allows US numbers to be properly formatted, for example.

DrHyde commented 10 years ago

NB 1bfabbbe8e

theory commented 10 years ago

Awesome, thanks!