Closed philippevezina closed 2 years ago
I see that the data has been updated since and the problem is still there. I would be inclined to say the problem is in the gem.
@philippevezina thanks for reporting. I found a bug in formatting rules. Fixed in version 0.6.57
Phonelib.parse('418 928 3648', 'CA').national # => "(418) 928-3648"
That's great! Thank you very much!
Formatting for Canadian phone numbers is incorrect:
What should be returned:
(418) 928-3648
. Here is the proof of concept withlibphonenumber
's sandbox: http://libphonenumber.appspot.com/phonenumberparser?number=4189283648&country=CA&geocodingLocale=en-USI can't say whether this is simply because it would have been fixed recently in
libphonenumber
and thatphonelib
's data is outdated or if it is rather a bug withphonelib
.Documentation on how to update the data could be appropriate to include in the README or Wiki.