marmelroy / PhoneNumberKit

A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
MIT License
5.13k stars 817 forks source link

Formatter.swift adding an extra 0 for Bangladesh numbers #756

Closed mtheresep closed 4 months ago

mtheresep commented 6 months ago

New Issue Checklist

Steps to reproduce

  1. Utilizing PhoneNumberKit.format to output .national type phone numbers.
  2. Choose the Bangladesh country picker option.
  3. Type a Bangladesh phone number. (example: 721-123456)
Expected result

National result: 721-123456

Actual result

National result: 0721-123456

Environment

Utilizing this library for an app via Cocoapods. Recently had a Bangladeshi user report that they are not able to add their phone number because of the extra 0 being added.

bguidolim commented 6 months ago

Hi @mtheresep

This is the expected result when formatting the number to national, it's defined in the metadata for this region.

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.