carddav2fb
carddav2fb copied to clipboard
Use libphonenumber to properly format phone numbers
This replaces the phone number formatting method using strtr()
with one that utilises the libphonenumber library (which is PHP port of the Google library with the same name.)
That allows a user to just define the country code where the FRITZ!Box will be used and libphonenumber
will handle the rest.
It will automatically apply appropriate formatting for phone numbers and detect whether it's a national or international phone number. See the docblock for the method used: https://github.com/giggsey/libphonenumber-for-php/blob/master/src/PhoneNumberUtil.php#L2643
Fixes #193