mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 858339 - PhoneNumberJS: Fix colombian phone numbers without the leading +. r=bent
This commit is contained in:
parent
d27ce43bfe
commit
3918b9d59a
@ -363,17 +363,17 @@ this.PhoneNumber = (function (dataBase) {
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
// If the number matches the possible numbers of the current region,
|
||||
// return it as a possible number.
|
||||
if (md.possiblePattern.test(number))
|
||||
return new NationalNumber(md, number);
|
||||
|
||||
// Now lets see if maybe its an international number after all, but
|
||||
// without '+' or the international prefix.
|
||||
ret = ParseInternationalNumber(number)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
// If the number matches the possible numbers of the current region,
|
||||
// return it as a possible number.
|
||||
if (md.possiblePattern.test(number))
|
||||
return new NationalNumber(md, number);
|
||||
|
||||
// We couldn't parse the number at all.
|
||||
return null;
|
||||
}
|
||||
|
@ -283,6 +283,9 @@ Format("0997654321", "CL", "997654321", "CL", "(99) 765 4321", "+56 99 765 4321"
|
||||
// Chile mobile number from another mobile number
|
||||
Format("997654321", "CL", "997654321", "CL", "(99) 765 4321", "+56 99 765 4321");
|
||||
|
||||
// Colombian international number without the leading "+"
|
||||
Format("5712234567", "CO", "12234567", "CO", "(1) 2234567", "+57 1 2234567");
|
||||
|
||||
// Dialing 911 in the US. This is not a national number.
|
||||
CantParse("911", "US");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user