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

How Get National Area Code #135

Open
danieldocki opened this issue Apr 26, 2024 · 0 comments
Open

How Get National Area Code #135

danieldocki opened this issue Apr 26, 2024 · 0 comments

Comments

@danieldocki
Copy link

How can I get the national code of a phone and just the number without the national code?

irb(main):064> result = TelephoneNumber.parse("+5555999999999")
=>
#<TelephoneNumber::Number:0x000000013d4d5d30
...
irb(main):065> result.international_number
=> "+55 55 99999-9999"
irb(main):066> result.national_number
=> "(55) 99999-9999"
irb(main):067> result.national_area_code
(irb):67:in `<main>': undefined method `national_area_code' for an instance of TelephoneNumber::Number (NoMethodError)
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