Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent formatting of international phone numbers #119

Open
sayinmehmet47 opened this issue Apr 29, 2024 · 0 comments
Open

Inconsistent formatting of international phone numbers #119

sayinmehmet47 opened this issue Apr 29, 2024 · 0 comments

Comments

@sayinmehmet47
Copy link

sayinmehmet47 commented Apr 29, 2024

I have noticed that the library formats some phone numbers correctly, but others are not formatted as expected.

Here is an example:

const pn1 = parsePhoneNumber('+41 7777772');
const pn2 = parsePhoneNumber('+33792193286');

console.log('phone1', pn1.number?.international);
console.log('phone2', pn2.number?.international);`

phone1 +41 7777772 phone2 +33 7 92 19 32 86

I would like both phone numbers to be formatted like +33 7 92 19 32 86, but the Swiss phone number (+41 7777772) is not being formatted correctly.

Could you please help me understand why this is happening and how I can get consistent formatting for all phone numbers?

Thank you for your assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant