-
Notifications
You must be signed in to change notification settings - Fork 217
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
Australian 13-numbers do not get correctly formatted. #400
Comments
Note, this has already been reported on issue #297, however, it is important to note that the number format that was shown was for Premium rate SMS - but this issue is not a premium rate SMS number. As shown in the screenshot, it is a SHARED_COST number, similar to 1300-numbers.
https://www.thenumberingsystem.com.au/
https://www.acma.gov.au/buy-custom-number <!-- Local-rate (SmartNumbers) are put here because they are a reverse-charge network,
although they charge a small local call connect fee (around 25c). These start with 13
or 1300. -->
<sharedCost>
<possibleLengths national="6,8,10"/>
<exampleNumber>1300123456</exampleNumber>
<nationalNumberPattern>
13(?:
00\d{3}|
45[0-4]
)\d{3}|
13\d{4}
</nationalNumberPattern>
</sharedCost> <!-- 6-digit variable cost fixed line (toll free, premium rate, shared cost) -->
<numberFormat pattern="(\d{2})(\d{2})(\d{2})">
<leadingDigits>13</leadingDigits>
<format>$1 $2 $3</format>
<intlFormat>NA</intlFormat>
</numberFormat> |
Hi. I have changed the README description previously to remove the seemingly too complex note about the library not formatting phone numbers with area code omitted:
Looks like I should re-add it because you're the first one who has reported something like this, and it happened after I've removed that note. Don't close this issue though because it will be something that others could see. |
No worries, happy to help :) This is not a number without an area code. Similar to the 1300 number (https://libphonenumber.appspot.com/phonenumberparser?number=1300555444&country=AU) which does get formatted correctly, the 13 number works in all areas of Australia. Here is an Aussie ad for good measure :) https://www.youtube.com/watch?v=Y0HchzE-7rM |
Cool ) So, to conclude, in Australia there're "mobile" numbers and "landline" numbers (like in any other country).
So, considering that this library is made for inputting people's personal phone numbers (mostly mobile) and not for crawling the web for all possible numbers (like Google's library), it doesn't have to format ads numbers because people shouldn't input those in the input field And if they've bought a fancy shortened number for themselves then they'd have to input a regular number just like all other normal people do. They're no "special", are they. So we don't consider this a bug, rather a feature. I've updated the readme note to include a link to this issue. |
@ccg-tim Lube Mobile will come to you, just for $300 |
In Australia, 13-smart numbers (different from 1300 numbers, as 13-numbers are 6 digits long) do not correctly get formatted using the AsYouType formatter.
According to the Australian style guide (https://www.stylemanual.gov.au/style-rules-and-conventions/numbers-and-measurements/telephone-numbers) 6 digit 13 numbers should be written like this:
Using the AsYouTypeFormatter from the Google Demo, it gets rendered correctly.
Using libphonenumber-js, it gets rendered as
Google's demo link
https://libphonenumber.appspot.com/phonenumberparser?number=134578&country=AU
The text was updated successfully, but these errors were encountered: