Skip to content

[FEATURE REQUEST] Add formatLandlinePhone()/formatMobilePhone()/formatPhone() #186

Closed

Description

@silvioprog

Hi.

It would be nice to provide the following format functions:

  • formatLandlinePhone(landlinePhone: string): string - Formats a landline phone, e.g.: 9999999999 → (99) 9999-9999;
  • formatMobilePhone(mobilePhone: string): string - Formats a mobile phone, e.g.: 99999999999 → (99) 99999-9999;
  • formatPhone(phone: string): string - Formats a landline or mobile phone, e.g.: 9999999999 → (99) 9999-9999 or 99999999999 → (99) 99999-9999.

cheers

Activity

  1. hyanmandian commented on Dec 8, 2020

    @hyanmandian
    Member

    Hello @silvioprog , maybe #155 solve your problem. What do you think? If not, we can split this function in three like you suggested.

  2. silvioprog commented on Dec 8, 2020

    @silvioprog
    ContributorAuthor

    Hello @hyanmandian, I'm going to test it, but a quickly look at the sources it seems will work like a charm. 😃

    Maybe a split would be nice to avoid overheads when the programmer wants to format only one type (eg: mobile phone) .

  3. hyanmandian commented on Dec 9, 2020

    @hyanmandian
    Member

    What do you think to implement these functions in #155 ? If you need some help, I can help you with that.

  4. hyanmandian commented on Jan 29, 2025

    @hyanmandian
    Member

    Entrara na proxima versao!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions