-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add libphonenumber 'format' field support. #80
Conversation
The coverage drop is because every entry in the XML provides a |
fc48959
to
1df809a
Compare
Now removed the 'else' case. I've defaulted to intlFormat given For #79 I'll work on adding separate new format_national and format_international functions to keep that independent. |
1df809a
to
99eca0e
Compare
99eca0e
to
a885e59
Compare
a885e59
to
f5cca32
Compare
f5cca32
to
6352192
Compare
Sorry for taking ages to get back to you on this, Real Life intervened and then I massively slacked off over Christmas and New Year. I like the idea of storing the nationally preferred representation of a number and making it available. However, the If this could be reworked into something like Number::Phone::Formatter::NationallyPreferred I'd be happy to merge it. |
This stores the format and intlFormat given for each libphonenumber formatter in the stub country files, and creates a NationallyPreferred Formatter that will use that data if present.
6352192
to
da17163
Compare
Okay, I've done that, it seems to work okay. I had to pass the object into the formatter, but kept the string argument for backwards compatibility, dos that make sense? For the other PR that then depends upon this one (national formatting), I can add another formatter to return the national formatted number ( |
Thanks! |
This stores the format/intlFormat given for each libphonenumber formatter in the stub country files, and adds a new NationallyPreferred formatter to use that infomation.
Fixes #78.