uinames icon indicating copy to clipboard operation
uinames copied to clipboard

Phone numbers in US format

Open tjotala opened this issue 8 years ago • 1 comments

The uinames.com site and extended usage API returns mock phone numbers in the US format (implied country code "+1"). This would be incorrect for any other country. I suggest one of two possible solutions:

  1. Return phone numbers formatted appropriately for each country.
  2. Return phone numbers as separate components (country code, area code, phone number) and leave the formatting to the user.

In either case, names.json would need to be extended to include the country code and plausible area codes for each region.

tjotala avatar Mar 29 '17 17:03 tjotala

consider using https://github.com/googlei18n/libphonenumber

srl295 avatar Mar 28 '18 19:03 srl295