Browse Source

libphonenumber v5.4 release.

Review URL: https://codereview.appspot.com/7570043
pull/567/head
Shaopeng Jia 13 years ago
committed by Mihaela Rosca
parent
commit
3765924e20
48 changed files with 8953 additions and 8670 deletions
  1. +1
    -1
      cpp/CMakeLists.txt
  2. +8387
    -8367
      cpp/src/phonenumbers/metadata.cc
  3. +40
    -37
      cpp/src/phonenumbers/phonenumberutil.cc
  4. +46
    -2
      cpp/test/phonenumbers/phonenumberutil_test.cc
  5. +4
    -0
      cpp/test/phonenumbers/test_util.h
  6. +14
    -0
      debian/changelog
  7. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/263_en
  8. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_cs
  9. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_en
  10. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_fr
  11. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_ko
  12. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh
  13. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh_Hant
  14. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_en
  15. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_fa
  16. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config
  17. +31
    -27
      java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
  18. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF
  19. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD
  20. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
  21. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ
  22. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN
  23. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR
  24. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP
  25. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
  26. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW
  27. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR
  28. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ
  29. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
  30. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG
  31. BIN
      java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW
  32. +25
    -1
      java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java
  33. +1
    -0
      java/libphonenumber/test/com/google/i18n/phonenumbers/RegionCode.java
  34. +12
    -0
      java/release_notes.txt
  35. +36
    -34
      javascript/i18n/phonenumbers/metadata.js
  36. +36
    -34
      javascript/i18n/phonenumbers/metadatalite.js
  37. +41
    -35
      javascript/i18n/phonenumbers/phonenumberutil.js
  38. +32
    -1
      javascript/i18n/phonenumbers/phonenumberutil_test.js
  39. +142
    -99
      resources/PhoneNumberMetaData.xml
  40. +35
    -0
      resources/geocoding/cs/82.txt
  41. +60
    -27
      resources/geocoding/en/263.txt
  42. +1
    -0
      resources/geocoding/en/82.txt
  43. +4
    -3
      resources/geocoding/en/98.txt
  44. +1
    -2
      resources/geocoding/fa/98.txt
  45. +1
    -0
      resources/geocoding/fr/82.txt
  46. +1
    -0
      resources/geocoding/ko/82.txt
  47. +1
    -0
      resources/geocoding/zh/82.txt
  48. +1
    -0
      resources/geocoding/zh_Hant/82.txt

+ 1
- 1
cpp/CMakeLists.txt View File

@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 2.8)
project (libphonenumber)
set (libphonenumber_VERSION_MAJOR 5)
set (libphonenumber_VERSION_MINOR 3)
set (libphonenumber_VERSION_MINOR 4)
# Helper functions dealing with finding libraries and programs this library
# depends on.


+ 8387
- 8367
cpp/src/phonenumbers/metadata.cc
File diff suppressed because it is too large
View File


+ 40
- 37
cpp/src/phonenumbers/phonenumberutil.cc View File

@ -163,17 +163,14 @@ void PrefixNumberWithCountryCallingCode(
string* formatted_number) {
switch (number_format) {
case PhoneNumberUtil::E164:
formatted_number->insert(
0, StrCat(kPlusSign, SimpleItoa(country_calling_code)));
formatted_number->insert(0, StrCat(kPlusSign, country_calling_code));
return;
case PhoneNumberUtil::INTERNATIONAL:
formatted_number->insert(
0, StrCat(kPlusSign, SimpleItoa(country_calling_code), " "));
formatted_number->insert(0, StrCat(kPlusSign, country_calling_code, " "));
return;
case PhoneNumberUtil::RFC3966:
formatted_number->insert(
0, StrCat(kRfc3966Prefix, kPlusSign,
SimpleItoa(country_calling_code), "-"));
formatted_number->insert(0, StrCat(kRfc3966Prefix, kPlusSign,
country_calling_code, "-"));
return;
case PhoneNumberUtil::NATIONAL:
default:
@ -1033,54 +1030,60 @@ void PhoneNumberUtil::FormatNumberForMobileDialing(
return;
}
formatted_number->assign("");
// Clear the extension, as that part cannot normally be dialed together with
// the main number.
PhoneNumber number_no_extension(number);
number_no_extension.clear_extension();
PhoneNumberType number_type = GetNumberType(number_no_extension);
string region_code;
GetRegionCodeForCountryCode(country_calling_code, &region_code);
if ((region_code == "CO") && (calling_from == "CO")) {
if (number_type == FIXED_LINE) {
if (calling_from == region_code) {
PhoneNumberType number_type = GetNumberType(number_no_extension);
bool is_fixed_line_or_mobile =
(number_type == FIXED_LINE) || (number_type == MOBILE) ||
(number_type == FIXED_LINE_OR_MOBILE);
// Carrier codes may be needed in some countries. We handle this here.
if ((region_code == "CO") && (number_type == FIXED_LINE)) {
FormatNationalNumberWithCarrierCode(
number_no_extension, kColombiaMobileToFixedLinePrefix,
formatted_number);
} else {
// E164 doesn't work at all when dialing within Colombia.
Format(number_no_extension, NATIONAL, formatted_number);
}
} else if ((region_code == "PE") && (calling_from == "PE")) {
// In Peru, numbers cannot be dialled using E164 format from a mobile phone
// for Movistar. Instead they must be dialled in national format.
Format(number_no_extension, NATIONAL, formatted_number);
} else if ((region_code == "AE") &&
(calling_from == "AE") && (number_type == UAN)) {
// In the United Arab Emirates, numbers with the prefix 600 (UAN numbers)
// cannot be dialled using E164 format. Instead they must be dialled in
// national format.
Format(number_no_extension, NATIONAL, formatted_number);
} else if ((region_code == "BR") && (calling_from == "BR") &&
((number_type == FIXED_LINE) || (number_type == MOBILE) ||
(number_type == FIXED_LINE_OR_MOBILE))) {
if (number_no_extension.has_preferred_domestic_carrier_code()) {
} else if ((region_code == "BR") && (is_fixed_line_or_mobile)) {
if (number_no_extension.has_preferred_domestic_carrier_code()) {
FormatNationalNumberWithPreferredCarrierCode(number_no_extension, "",
formatted_number);
} else {
// Brazilian fixed line and mobile numbers need to be dialed with a
// carrier code when called within Brazil. Without that, most of the
// carriers won't connect the call. Because of that, we return an empty
// string here.
formatted_number->assign("");
}
} else {
// Brazilian fixed line and mobile numbers need to be dialed with a
// carrier code when called within Brazil. Without that, most of the
// carriers won't connect the call. Because of that, we return an empty
// string here.
formatted_number->assign("");
// For NANPA countries, non-geographical countries, and Mexican fixed line
// and mobile numbers, we output international format for numbers that can
// be dialed internationally as that always works.
if ((country_calling_code == kNanpaCountryCode ||
region_code == kRegionCodeForNonGeoEntity ||
// MX fixed line and mobile numbers should always be formatted in
// international format, even when dialed within MX. For national
// format to work, a carrier code needs to be used, and the correct
// carrier code depends on if the caller and callee are from the same
// local area. It is trickier to get that to work correctly than
// using international format, which is tested to work fine on all
// carriers.
(region_code == "MX" && is_fixed_line_or_mobile)) &&
CanBeInternationallyDialled(number_no_extension)) {
Format(number_no_extension, INTERNATIONAL, formatted_number);
} else {
Format(number_no_extension, NATIONAL, formatted_number);
}
}
} else if (CanBeInternationallyDialled(number_no_extension)) {
with_formatting
? Format(number_no_extension, INTERNATIONAL, formatted_number)
: Format(number_no_extension, E164, formatted_number);
return;
} else if (calling_from == region_code) {
Format(number_no_extension, NATIONAL, formatted_number);
} else {
formatted_number->assign("");
}
if (!with_formatting) {
NormalizeHelper(reg_exps_->diallable_char_mappings_,


+ 46
- 2
cpp/test/phonenumbers/phonenumberutil_test.cc View File

@ -947,10 +947,35 @@ TEST_F(PhoneNumberUtilTest, FormatWithPreferredCarrierCode) {
TEST_F(PhoneNumberUtilTest, FormatNumberForMobileDialing) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(1);
// Numbers are normally dialed in national format in-country, and
// international format from outside the country.
test_number.set_country_code(49);
test_number.set_national_number(30123456ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::DE(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("030123456", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CH(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("+4930123456", formatted_number);
test_number.set_extension("1234");
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::DE(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("030123456", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CH(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("+4930123456", formatted_number);
test_number.set_country_code(1);
test_number.clear_extension();
// US toll free numbers are marked as noInternationalDialling in the test
// metadata for testing purposes.
// metadata for testing purposes. For such numbers, we expect nothing to be
// returned when the region code is not the same one.
test_number.set_national_number(8002530000ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), true, /* keep formatting */
@ -1022,6 +1047,25 @@ TEST_F(PhoneNumberUtilTest, FormatNumberForMobileDialing) {
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::AE(), true, &formatted_number);
EXPECT_EQ("600123456", formatted_number);
test_number.set_country_code(52);
test_number.set_national_number(3312345678ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::MX(), false, &formatted_number);
EXPECT_EQ("+523312345678", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+523312345678", formatted_number);
// Non-geographical numbers should always be dialed in international format.
test_number.set_country_code(800);
test_number.set_national_number(12345678ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+80012345678", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::UN001(), false, &formatted_number);
EXPECT_EQ("+80012345678", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatByPattern) {


+ 4
- 0
cpp/test/phonenumbers/test_util.h View File

@ -89,6 +89,10 @@ class RegionCode {
return "CA";
}
static const char* CH() {
return "CH";
}
static const char* CN() {
return "CN";
}


+ 14
- 0
debian/changelog View File

@ -1,3 +1,17 @@
libphonenumber (5.4) precise; urgency=low
* Code changes:
- Switch formatNumberForMobileDialing to prefer national format to international format when the
number is dialed from the same region the phone number is from.
* Metadata changes:
- Updated metadata for region code(s):
BF, CD, CN, CZ, GN, IR, JP, KR, KW, LR, NZ, TT, UG, ZW
- New geocoding data for country calling code(s): 82 (cs)
- Updated geocoding data for country calling code(s):
82 (en, fr, ko, zh, zh_Hant), 98 (en, fa), 263 (en)
-- Shaopeng Jia <shaopengjia@google.com> Thu, 07 Mar 2013 14:54:10 +0100
libphonenumber (5.3.2) precise; urgency=low
* Metadata changes:


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/263_en View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_cs View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_en View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_fr View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_ko View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh_Hant View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_en View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_fa View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config View File


+ 31
- 27
java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java View File

@ -1203,43 +1203,47 @@ public class PhoneNumberUtil {
return number.hasRawInput() ? number.getRawInput() : "";
}
String formattedNumber;
String formattedNumber = "";
// Clear the extension, as that part cannot normally be dialed together with the main number.
PhoneNumber numberNoExt = new PhoneNumber().mergeFrom(number).clearExtension();
PhoneNumberType numberType = getNumberType(numberNoExt);
String regionCode = getRegionCodeForCountryCode(countryCallingCode);
if (regionCode.equals("CO") && regionCallingFrom.equals("CO")) {
if (numberType == PhoneNumberType.FIXED_LINE) {
if (regionCallingFrom.equals(regionCode)) {
PhoneNumberType numberType = getNumberType(numberNoExt);
boolean isFixedLineOrMobile =
(numberType == PhoneNumberType.FIXED_LINE) || (numberType == PhoneNumberType.MOBILE) ||
(numberType == PhoneNumberType.FIXED_LINE_OR_MOBILE);
// Carrier codes may be needed in some countries. We handle this here.
if (regionCode.equals("CO") && numberType == PhoneNumberType.FIXED_LINE) {
formattedNumber =
formatNationalNumberWithCarrierCode(numberNoExt, COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX);
} else if (regionCode.equals("BR") && isFixedLineOrMobile) {
formattedNumber = numberNoExt.hasPreferredDomesticCarrierCode()
? formattedNumber = formatNationalNumberWithPreferredCarrierCode(numberNoExt, "")
// Brazilian fixed line and mobile numbers need to be dialed with a carrier code when
// called within Brazil. Without that, most of the carriers won't connect the call.
// Because of that, we return an empty string here.
: "";
} else {
// E164 doesn't work at all when dialing within Colombia.
formattedNumber = format(numberNoExt, PhoneNumberFormat.NATIONAL);
// For NANPA countries, non-geographical countries, and Mexican fixed line and mobile
// numbers, we output international format for numbers that can be dialed internationally
// as that always works.
if ((countryCallingCode == NANPA_COUNTRY_CODE ||
regionCode.equals(REGION_CODE_FOR_NON_GEO_ENTITY) ||
// MX fixed line and mobile numbers should always be formatted in international format,
// even when dialed within MX. For national format to work, a carrier code needs to be
// used, and the correct carrier code depends on if the caller and callee are from the
// same local area. It is trickier to get that to work correctly than using
// international format, which is tested to work fine on all carriers.
(regionCode.equals("MX") && isFixedLineOrMobile)) &&
canBeInternationallyDialled(numberNoExt)) {
formattedNumber = format(numberNoExt, PhoneNumberFormat.INTERNATIONAL);
} else {
formattedNumber = format(numberNoExt, PhoneNumberFormat.NATIONAL);
}
}
} else if (regionCode.equals("PE") && regionCallingFrom.equals("PE")) {
// In Peru, numbers cannot be dialled using E164 format from a mobile phone for Movistar.
// Instead they must be dialled in national format.
formattedNumber = format(numberNoExt, PhoneNumberFormat.NATIONAL);
} else if (regionCode.equals("AE") && regionCallingFrom.equals("AE") &&
numberType == PhoneNumberType.UAN) {
// In the United Arab Emirates, numbers with the prefix 600 (UAN numbers) cannot be dialled
// using E164 format. Instead they must be dialled in national format.
formattedNumber = format(numberNoExt, PhoneNumberFormat.NATIONAL);
} else if (regionCode.equals("BR") && regionCallingFrom.equals("BR") &&
((numberType == PhoneNumberType.FIXED_LINE) || (numberType == PhoneNumberType.MOBILE) ||
(numberType == PhoneNumberType.FIXED_LINE_OR_MOBILE))) {
formattedNumber = numberNoExt.hasPreferredDomesticCarrierCode()
? formatNationalNumberWithPreferredCarrierCode(numberNoExt, "")
// Brazilian fixed line and mobile numbers need to be dialed with a carrier code when
// called within Brazil. Without that, most of the carriers won't connect the call.
// Because of that, we return an empty string here.
: "";
} else if (canBeInternationallyDialled(numberNoExt)) {
return withFormatting ? format(numberNoExt, PhoneNumberFormat.INTERNATIONAL)
: format(numberNoExt, PhoneNumberFormat.E164);
} else {
formattedNumber = (regionCallingFrom.equals(regionCode))
? format(numberNoExt, PhoneNumberFormat.NATIONAL) : "";
}
return withFormatting ? formattedNumber
: normalizeHelper(formattedNumber, DIALLABLE_CHAR_MAPPINGS,


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG View File


BIN
java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW View File


+ 25
- 1
java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java View File

@ -689,8 +689,21 @@ public class PhoneNumberUtilTest extends TestMetadataTestCase {
}
public void testFormatNumberForMobileDialing() {
// Numbers are normally dialed in national format in-country, and international format from
// outside the country.
assertEquals("030123456",
phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.DE, false));
assertEquals("+4930123456",
phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.CH, false));
PhoneNumber deNumberWithExtn = new PhoneNumber().mergeFrom(DE_NUMBER).setExtension("1234");
assertEquals("030123456",
phoneUtil.formatNumberForMobileDialing(deNumberWithExtn, RegionCode.DE, false));
assertEquals("+4930123456",
phoneUtil.formatNumberForMobileDialing(deNumberWithExtn, RegionCode.CH, false));
// US toll free numbers are marked as noInternationalDialling in the test metadata for testing
// purposes.
// purposes. For such numbers, we expect nothing to be returned when the region code is not the
// same one.
assertEquals("800 253 0000",
phoneUtil.formatNumberForMobileDialing(US_TOLLFREE, RegionCode.US,
true /* keep formatting */));
@ -733,6 +746,17 @@ public class PhoneNumberUtilTest extends TestMetadataTestCase {
phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.JP, false));
assertEquals("600123456",
phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.AE, false));
assertEquals("+523312345678",
phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.MX, false));
assertEquals("+523312345678",
phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.US, false));
// Non-geographical numbers should always be dialed in international format.
assertEquals("+80012345678",
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE, RegionCode.US, false));
assertEquals("+80012345678",
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE, RegionCode.UN001, false));
}
public void testFormatByPattern() {


+ 1
- 0
java/libphonenumber/test/com/google/i18n/phonenumbers/RegionCode.java View File

@ -32,6 +32,7 @@ final class RegionCode {
static final String BS = "BS";
static final String BY = "BY";
static final String CA = "CA";
static final String CH = "CH";
static final String CN = "CN";
static final String CS = "CS";
static final String DE = "DE";


+ 12
- 0
java/release_notes.txt View File

@ -1,3 +1,15 @@
Mar 07, 2013: libphonenumber-5.4
* Code changes:
- Switch formatNumberForMobileDialing to prefer national format to international format when the
number is dialed from the same region the phone number is from.
* Metadata changes:
- Updated metadata for region code(s):
BF, CD, CN, CZ, GN, IR, JP, KR, KW, LR, NZ, TT, UG, ZW
- New geocoding data for country calling code(s): 82 (cs)
- Updated geocoding data for country calling code(s):
82 (en, fr, ko, zh, zh_Hant), 98 (en, fa), 263 (en)
Feb 11, 2013: libphonenumber-5.3.2
* Metadata changes:
- Updated metadata for region code(s):


+ 36
- 34
javascript/i18n/phonenumbers/metadata.js View File

@ -673,7 +673,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"BF":[,[,,"[24-7]\\d{7}","\\d{8}"]
,[,,"(?:20(?:49|5[23]|9[016-9])|40(?:4[56]|5[4-6]|7[0179])|50[34]\\d)\\d{4}","\\d{8}",,,"20491234"]
,[,,"(?:6(?:[056]\\d|1[0-3]|8[0-2]|90)|7(?:[02-68]\\d|1[0-4689]|7[0-69]|9[0-689]))\\d{5}","\\d{8}",,,"70123456"]
,[,,"(?:6(?:[056]\\d|1[0-367]|8[0-3]|90)|7(?:[02-68]\\d|1[0-4689]|7[0-69]|9[0-689]))\\d{5}","\\d{8}",,,"70123456"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
@ -999,15 +999,17 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,,[,,"000|112","\\d{3}",,,"112"]
,[,,"NA","NA"]
]
,"CD":[,[,,"[1-6]\\d{6}|8\\d{6,8}|9\\d{8}","\\d{7,9}"]
,[,,"[1-6]\\d{6}","\\d{7}",,,"1234567"]
,"CD":[,[,,"[2-6]\\d{6}|[18]\\d{6,8}|9\\d{8}","\\d{7,9}"]
,[,,"1(?:2\\d{7}|\\d{6})|[2-6]\\d{6}","\\d{7,9}",,,"1234567"]
,[,,"8(?:[0-259]\\d{2}|[48])\\d{5}|9[7-9]\\d{7}","\\d{7,9}",,,"991234567"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,"CD",243,"00","0",,,"0",,,,[[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[0-259]|9"]
,"CD",243,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["12"]
,"0$1","",0]
,[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[0-259]|9"]
,"0$1","",0]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["8[48]"]
,"0$1","",0]
@ -1157,7 +1159,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"CN":[,[,,"[1-7]\\d{7,11}|8[0-357-9]\\d{6,9}|9(?:5\\d{3}|\\d{9})","\\d{4,12}"]
,[,,"21\\d{8,10}|(?:10|2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898)\\d{8}|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[3-9]|5[2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))\\d{7}|80(?:29|6[03578]|7[018]|81)\\d{4}","\\d{4,12}",,,"1012345678"]
,[,,"21\\d{8,10}|(?:10|2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98))\\d{8}|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[3-9]|5[2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))\\d{7}|80(?:29|6[03578]|7[018]|81)\\d{4}","\\d{4,12}",,,"1012345678"]
,[,,"1(?:3\\d|4[57]|[58][0-35-9])\\d{8}","\\d{11}",,,"13123456789"]
,[,,"(?:10)?800\\d{7}","\\d{10,12}",,,"8001234567"]
,[,,"16[08]\\d{5}","\\d{8}",,,"16812345"]
@ -1176,9 +1178,9 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,"0$1","$CC $1",1]
,[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898"]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|[37]|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,"0$1","$CC $1",1]
,[,"(1[3-58]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["1[3-58]"]
,"","$CC $1",0]
@ -1195,9 +1197,9 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,"0$1","$CC $1",1]
,[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]","10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898","3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898"]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)","3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|[37]|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])","3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|[37]|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])","3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,"0$1","$CC $1",1]
,[,"(1[3-58]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["1[3-58]","1[3-58]"]
,"","$CC $1",0]
@ -1360,7 +1362,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,,[,,"NA","NA"]
,,,[,,"NA","NA"]
,[,,"9(?:5[056]|7[234])\\d{6}","\\d{9,12}",,,"972123456"]
,[,,"9(?:5\\d|7[234])\\d{6}","\\d{9,12}",,,"972123456"]
,,[,,"1(?:12|5[058])","\\d{3}",,,"112"]
,[,,"9(?:3\\d{9}|6\\d{7,10})","\\d{9,12}",,,"93123456789"]
]
@ -1909,7 +1911,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"GN":[,[,,"[23567]\\d{7,8}","\\d{8,9}"]
,[,,"30(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])\\d{4}","\\d{8}",,,"30241234"]
,[,,"(?:24|55)\\d{6}|6(?:0(?:2[0-35-9]|3[3467]|5[2457-9])|1[0-5]\\d|2\\d{2,3}|[4-9]\\d{2}|3(?:[14]0|35))\\d{4}","\\d{8,9}",,,"60201234"]
,[,,"(?:24|55)\\d{6}|6(?:0(?:2[0-35-9]|3[3467]|5[2457-9])|1[0-5]\\d|2\\d{2}|[4-9]\\d{2}|3(?:[14]0|35))\\d{4}|6(?:[03]1|2[128]|5[57]|6[2469])\\d{6}","\\d{8,9}",,,"60201234"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
@ -1917,7 +1919,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"78\\d{6}","\\d{8}",,,"78123456"]
,"GN",224,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[23567]"]
,"","",0]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["62"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6[02356]"]
,"","",0]
]
,,[,,"NA","NA"]
@ -2347,7 +2349,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,"0$1","",0]
,[,"(21)(\\d{3})(\\d{3,4})","$1 $2 $3",["21"]
,"0$1","",0]
,[,"(21)(\\d{4})(\\d{4})","$1 $2 $3",["21"]
,[,"(2[16])(\\d{4})(\\d{4})","$1 $2 $3",["2[16]"]
,"0$1","",0]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]|2[02-9]"]
,"0$1","",0]
@ -2468,7 +2470,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"990\\d{6}","\\d{9}",,,"990123456"]
,[,,"NA","NA"]
,[,,"60\\d{7}","\\d{9}",,,"601234567"]
,[,,"50\\d{8}","\\d{10}",,,"5012345678"]
,[,,"50[1-9]\\d{7}","\\d{10}",,,"5012345678"]
,"JP",81,"010","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"]
,"0$1","",0]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"]
@ -2635,8 +2637,8 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"KR":[,[,,"[1-7]\\d{3,9}|8\\d{8}","\\d{4,10}"]
,[,,"(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\\d{2,3}|[2-9]\\d{6,7})","\\d{4,10}",,,"22123456"]
,[,,"1[0-25-9]\\d{7,8}","\\d{9,10}",,,"1023456789"]
,[,,"(?:2|3[1-3]|[46][1-4]|5[1-5])(?:1\\d{2,3}|[2-9]\\d{6,7})","\\d{4,10}",,,"22123456"]
,[,,"1[0-26-9]\\d{7,8}","\\d{9,10}",,,"1023456789"]
,[,,"80\\d{7}","\\d{9}",,,"801234567"]
,[,,"60[2-9]\\d{6}","\\d{9}",,,"602345678"]
,[,,"NA","NA"]
@ -2663,7 +2665,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,"(\\d{4})(\\d{4})","$1-$2",["1(?:5[46-9]|6[04678])","1(?:5(?:44|66|77|88|99)|6(?:00|44|6[16]|70|88))"]
,"$1","0$CC-$1",0]
]
,,[,,"NA","NA"]
,,[,,"15\\d{7,8}","\\d{9,10}",,,"1523456789"]
,,,[,,"NA","NA"]
,[,,"1(?:5(?:44|66|77|88|99)|6(?:00|44|6[16]|70|88))\\d{4}","\\d{8}",,,"15441234"]
,,[,,"11[29]","\\d{3}",,,"112"]
@ -2671,7 +2673,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"KW":[,[,,"[12569]\\d{6,7}","\\d{7,8}"]
,[,,"(?:18\\d|2(?:[23]\\d{2}|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7])))\\d{4}","\\d{7,8}",,,"22345678"]
,[,,"(?:5(?:11|[05]\\d)|6(?:0[034679]|5[015-9]|6\\d|7[067]|9[069])|9(?:0[09]|4[049]|6[69]|[79]\\d))\\d{5}","\\d{8}",,,"50012345"]
,[,,"(?:5(?:1[0-2]|[05]\\d)|6(?:0[034679]|5[015-9]|6\\d|7[067]|9[0369])|9(?:0[09]|4[049]|6[069]|[79]\\d))\\d{5}","\\d{8}",,,"50012345"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
@ -2816,7 +2818,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"LR":[,[,,"(?:[29]\\d|[4-6]|7\\d{1,2}|[38]\\d{2})\\d{6}","\\d{7,9}"]
,[,,"2\\d{7}","\\d{8}",,,"21234567"]
,[,,"(?:4[67]|5\\d|6[4-8]|7(?:7[67]\\d|\\d{2})|88\\d{2})\\d{5}","\\d{7,9}",,,"4612345"]
,[,,"(?:4[67]|5\\d|6[4-8]|77?\\d{2}|88\\d{2})\\d{5}","\\d{7,9}",,,"4612345"]
,[,,"NA","NA"]
,[,,"90\\d{6}","\\d{8}",,,"90123456"]
,[,,"NA","NA"]
@ -3606,7 +3608,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"NZ":[,[,,"6[235-9]\\d{6}|[2-57-9]\\d{7,10}","\\d{7,11}"]
,[,,"(?:3[2-79]|[49][2-689]|6[235-9]|7[2-589])\\d{6}|24099\\d{3}","\\d{7,8}",,,"32345678"]
,[,,"(?:3[2-79]|[49][2-689]|6[235-9]|7[2-5789])\\d{6}|24099\\d{3}","\\d{7,8}",,,"32345678"]
,[,,"2(?:[028]\\d{7,8}|1(?:0\\d{5,7}|[12]\\d{5,6}|[3-9]\\d{5})|[79]\\d{7})","\\d{8,10}",,,"211234567"]
,[,,"508\\d{6,7}|80\\d{6,8}","\\d{8,10}",,,"800123456"]
,[,,"90\\d{7,9}","\\d{9,11}",,,"900123456"]
@ -4686,7 +4688,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"TT":[,[,,"[589]\\d{9}","\\d{7}(?:\\d{3})?"]
,[,,"868(?:2(?:01|2[1-5])|6(?:07|1[4-6]|2[1-9]|[3-6]\\d|7[0-79]|9[0-8])|82[12])\\d{4}","\\d{7}(?:\\d{3})?",,,"8682211234"]
,[,,"868(?:29\\d|3(?:0[1-9]|1[02-9]|[2-9]\\d)|4(?:[679]\\d|8[0-4])|6(?:20|78|8\\d)|7(?:03|1[02-9]|[2-9]\\d))\\d{4}","\\d{10}",,,"8682911234"]
,[,,"868(?:2(?:8[59]|9\\d)|3(?:0[1-9]|1[02-9]|[2-9]\\d)|4(?:[679]\\d|8[0-4])|6(?:20|78|8\\d)|7(?:03|1[02-9]|[2-9]\\d))\\d{4}","\\d{10}",,,"8682911234"]
,[,,"8(?:00|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"]
,[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"]
,[,,"NA","NA"]
@ -4774,14 +4776,14 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"UG":[,[,,"\\d{9}","\\d{5,9}"]
,[,,"20(?:[014]\\d{2}|2(?:40|[5-9]\\d)|3[23]\\d|5[0-4]\\d)\\d{4}|[34]\\d{8}","\\d{5,9}",,,"312345678"]
,[,,"7(?:0[0-7]|[15789]\\d|20|[46][0-4])\\d{6}","\\d{9}",,,"712345678"]
,[,,"20(?:[0147]\\d{2}|2(?:40|[5-9]\\d)|3[23]\\d|5[0-4]\\d|60\\d|8[0-2]\\d)\\d{4}|[34]\\d{8}","\\d{5,9}",,,"312345678"]
,[,,"7(?:0[0-7]|[15789]\\d|[23]0|[46][0-4])\\d{6}","\\d{9}",,,"712345678"]
,[,,"800[123]\\d{5}","\\d{9}",,,"800123456"]
,[,,"90[123]\\d{6}","\\d{9}",,,"901123456"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{3})(\\d{6})","$1 $2",["[7-9]|20(?:[013-5]|2[5-9])|4(?:6[45]|[7-9])"]
,"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{3})(\\d{6})","$1 $2",["[7-9]|20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])"]
,"0$1","",0]
,[,"(\\d{2})(\\d{7})","$1 $2",["3|4(?:[1-5]|6[0-36-9])"]
,"0$1","",0]
@ -5084,33 +5086,33 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,,[,,"(?:112|99[139])","\\d{3}",,,"999"]
,[,,"NA","NA"]
]
,"ZW":[,[,,"2(?:[012457-9]\\d{3,8}|6\\d{3,6})|[13-79]\\d{4,8}|86\\d{8}","\\d{3,10}"]
,[,,"(?:1[3-9]|2(?:0[45]|[16]|2[28]|[49]8?|58[23]|7[246]|8[1346-9])|3(?:08?|17?|3[78]|[2456]|7[1569]|8[379])|5(?:[07-9]|1[78]|483|5(?:7?|8))|6(?:0|28|37?|[45][68][78]|98?)|848)\\d{3,6}|(?:2(?:27|5|7[135789]|8[25])|3[39]|5[1-46]|6[126-8])\\d{4,6}|2(?:0|70)\\d{5,6}|(?:4\\d|9[2-8])\\d{4,7}","\\d{3,10}",,,"1312345"]
,[,,"7[137]\\d{7}|86(?:22|44)\\d{6}","\\d{9,10}",,,"711234567"]
,[,,"NA","NA"]
,"ZW":[,[,,"2(?:[012457-9]\\d{3,8}|6\\d{3,6})|[13-79]\\d{4,8}|8[06]\\d{8}","\\d{3,10}"]
,[,,"(?:1[3-9]|2(?:0[45]|[16]|2[28]|[49]8?|58[23]|7[246]|8[1346-9])|3(?:08?|17?|3[78]|[2456]|7[1569]|8[379])|5(?:[07-9]|1[78]|483|5(?:7?|8))|6(?:0|28|37?|[45][68][78]|98?)|848)\\d{3,6}|(?:2(?:27|5|7[135789]|8[25])|3[39]|5[1-46]|6[126-8])\\d{4,6}|2(?:(?:0|70)\\d{5,6}|2[05]\\d{7})|(?:4\\d|9[2-8])\\d{4,7}","\\d{3,10}",,,"1312345"]
,[,,"7[1378]\\d{7}|86(?:22|44)\\d{6}","\\d{9,10}",,,"711234567"]
,[,,"800\\d{7}","\\d{10}",,,"8001234567"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"86(?:1[12]|30|8[367]|99)\\d{6}","\\d{10}",,,"8686123456"]
,[,,"86(?:1[12]|30|55|77|8[367]|99)\\d{6}","\\d{10}",,,"8686123456"]
,"ZW",263,"00","0",,,"0",,,,[[,"([49])(\\d{3})(\\d{2,5})","$1 $2 $3",["4|9[2-9]"]
,"0$1","",0]
,[,"([179]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[19]1|7"]
,"0$1","",0]
,[,"(86\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["86[24]"]
,"0$1","",0]
,[,"([1-356]\\d)(\\d{3,5})","$1 $2",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,[,"([2356]\\d{2})(\\d{3,5})","$1 $2",["2(?:[278]|0[45]|[49]8)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])"]
,"0$1","",0]
,[,"([1-356]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:[278]|0[45]|48)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])|80"]
,"0$1","",0]
,[,"([2356]\\d{2})(\\d{3,5})","$1 $2",["2(?:[278]|0[45]|48)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])"]
,[,"([1-356]\\d)(\\d{3,5})","$1 $2",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,"0$1","",0]
,[,"([2356]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2(?:[278]|0[45]|48)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])"]
,[,"([1-356]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,"0$1","",0]
,[,"([25]\\d{3})(\\d{3,5})","$1 $2",["(?:25|54)8","258[23]|5483"]
,"0$1","",0]
,[,"([25]\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["(?:25|54)8","258[23]|5483"]
,"0$1","",0]
,[,"(8\\d{3})(\\d{6})","$1 $2",["86[1389]"]
,[,"(8\\d{3})(\\d{6})","$1 $2",["86"]
,"0$1","",0]
]
,,[,,"NA","NA"]


+ 36
- 34
javascript/i18n/phonenumbers/metadatalite.js View File

@ -673,7 +673,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"BF":[,[,,"[24-7]\\d{7}","\\d{8}"]
,[,,"(?:20(?:49|5[23]|9[016-9])|40(?:4[56]|5[4-6]|7[0179])|50[34]\\d)\\d{4}","\\d{8}"]
,[,,"(?:6(?:[056]\\d|1[0-3]|8[0-2]|90)|7(?:[02-68]\\d|1[0-4689]|7[0-69]|9[0-689]))\\d{5}","\\d{8}"]
,[,,"(?:6(?:[056]\\d|1[0-367]|8[0-3]|90)|7(?:[02-68]\\d|1[0-4689]|7[0-69]|9[0-689]))\\d{5}","\\d{8}"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
@ -999,15 +999,17 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,,[,,"000|112","\\d{3}"]
,[,,"NA","NA"]
]
,"CD":[,[,,"[1-6]\\d{6}|8\\d{6,8}|9\\d{8}","\\d{7,9}"]
,[,,"[1-6]\\d{6}","\\d{7}"]
,"CD":[,[,,"[2-6]\\d{6}|[18]\\d{6,8}|9\\d{8}","\\d{7,9}"]
,[,,"1(?:2\\d{7}|\\d{6})|[2-6]\\d{6}","\\d{7,9}"]
,[,,"8(?:[0-259]\\d{2}|[48])\\d{5}|9[7-9]\\d{7}","\\d{7,9}"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,"CD",243,"00","0",,,"0",,,,[[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[0-259]|9"]
,"CD",243,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["12"]
,"0$1","",0]
,[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[0-259]|9"]
,"0$1","",0]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["8[48]"]
,"0$1","",0]
@ -1157,7 +1159,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"CN":[,[,,"[1-7]\\d{7,11}|8[0-357-9]\\d{6,9}|9(?:5\\d{3}|\\d{9})","\\d{4,12}"]
,[,,"21\\d{8,10}|(?:10|2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898)\\d{8}|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[3-9]|5[2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))\\d{7}|80(?:29|6[03578]|7[018]|81)\\d{4}","\\d{4,12}"]
,[,,"21\\d{8,10}|(?:10|2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98))\\d{8}|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[3-9]|5[2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))\\d{7}|80(?:29|6[03578]|7[018]|81)\\d{4}","\\d{4,12}"]
,[,,"1(?:3\\d|4[57]|[58][0-35-9])\\d{8}","\\d{11}"]
,[,,"(?:10)?800\\d{7}","\\d{10,12}"]
,[,,"16[08]\\d{5}","\\d{8}"]
@ -1176,9 +1178,9 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,"0$1","$CC $1",1]
,[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898"]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|[37]|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,"0$1","$CC $1",1]
,[,"(1[3-58]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["1[3-58]"]
,"","$CC $1",0]
@ -1195,9 +1197,9 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,"0$1","$CC $1",1]
,[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]","10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898","3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|898"]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)","3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|[37]|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])","3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|[37]|5[1-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])","3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]
,"0$1","$CC $1",1]
,[,"(1[3-58]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["1[3-58]","1[3-58]"]
,"","$CC $1",0]
@ -1360,7 +1362,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,,[,,"NA","NA"]
,,,[,,"NA","NA"]
,[,,"9(?:5[056]|7[234])\\d{6}","\\d{9,12}"]
,[,,"9(?:5\\d|7[234])\\d{6}","\\d{9,12}"]
,,[,,"1(?:12|5[058])","\\d{3}"]
,[,,"9(?:3\\d{9}|6\\d{7,10})","\\d{9,12}"]
]
@ -1909,7 +1911,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"GN":[,[,,"[23567]\\d{7,8}","\\d{8,9}"]
,[,,"30(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])\\d{4}","\\d{8}"]
,[,,"(?:24|55)\\d{6}|6(?:0(?:2[0-35-9]|3[3467]|5[2457-9])|1[0-5]\\d|2\\d{2,3}|[4-9]\\d{2}|3(?:[14]0|35))\\d{4}","\\d{8,9}"]
,[,,"(?:24|55)\\d{6}|6(?:0(?:2[0-35-9]|3[3467]|5[2457-9])|1[0-5]\\d|2\\d{2}|[4-9]\\d{2}|3(?:[14]0|35))\\d{4}|6(?:[03]1|2[128]|5[57]|6[2469])\\d{6}","\\d{8,9}"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
@ -1917,7 +1919,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"78\\d{6}","\\d{8}"]
,"GN",224,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[23567]"]
,"","",0]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["62"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6[02356]"]
,"","",0]
]
,,[,,"NA","NA"]
@ -2347,7 +2349,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,"0$1","",0]
,[,"(21)(\\d{3})(\\d{3,4})","$1 $2 $3",["21"]
,"0$1","",0]
,[,"(21)(\\d{4})(\\d{4})","$1 $2 $3",["21"]
,[,"(2[16])(\\d{4})(\\d{4})","$1 $2 $3",["2[16]"]
,"0$1","",0]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]|2[02-9]"]
,"0$1","",0]
@ -2468,7 +2470,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"990\\d{6}","\\d{9}"]
,[,,"NA","NA"]
,[,,"60\\d{7}","\\d{9}"]
,[,,"50\\d{8}","\\d{10}"]
,[,,"50[1-9]\\d{7}","\\d{10}"]
,"JP",81,"010","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"]
,"0$1","",0]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"]
@ -2635,8 +2637,8 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"KR":[,[,,"[1-7]\\d{3,9}|8\\d{8}","\\d{4,10}"]
,[,,"(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\\d{2,3}|[2-9]\\d{6,7})","\\d{4,10}"]
,[,,"1[0-25-9]\\d{7,8}","\\d{9,10}"]
,[,,"(?:2|3[1-3]|[46][1-4]|5[1-5])(?:1\\d{2,3}|[2-9]\\d{6,7})","\\d{4,10}"]
,[,,"1[0-26-9]\\d{7,8}","\\d{9,10}"]
,[,,"80\\d{7}","\\d{9}"]
,[,,"60[2-9]\\d{6}","\\d{9}"]
,[,,"NA","NA"]
@ -2663,7 +2665,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,"(\\d{4})(\\d{4})","$1-$2",["1(?:5[46-9]|6[04678])","1(?:5(?:44|66|77|88|99)|6(?:00|44|6[16]|70|88))"]
,"$1","0$CC-$1",0]
]
,,[,,"NA","NA"]
,,[,,"15\\d{7,8}","\\d{9,10}"]
,,,[,,"NA","NA"]
,[,,"1(?:5(?:44|66|77|88|99)|6(?:00|44|6[16]|70|88))\\d{4}","\\d{8}"]
,,[,,"11[29]","\\d{3}"]
@ -2671,7 +2673,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"KW":[,[,,"[12569]\\d{6,7}","\\d{7,8}"]
,[,,"(?:18\\d|2(?:[23]\\d{2}|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7])))\\d{4}","\\d{7,8}"]
,[,,"(?:5(?:11|[05]\\d)|6(?:0[034679]|5[015-9]|6\\d|7[067]|9[069])|9(?:0[09]|4[049]|6[69]|[79]\\d))\\d{5}","\\d{8}"]
,[,,"(?:5(?:1[0-2]|[05]\\d)|6(?:0[034679]|5[015-9]|6\\d|7[067]|9[0369])|9(?:0[09]|4[049]|6[069]|[79]\\d))\\d{5}","\\d{8}"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
@ -2816,7 +2818,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"LR":[,[,,"(?:[29]\\d|[4-6]|7\\d{1,2}|[38]\\d{2})\\d{6}","\\d{7,9}"]
,[,,"2\\d{7}","\\d{8}"]
,[,,"(?:4[67]|5\\d|6[4-8]|7(?:7[67]\\d|\\d{2})|88\\d{2})\\d{5}","\\d{7,9}"]
,[,,"(?:4[67]|5\\d|6[4-8]|77?\\d{2}|88\\d{2})\\d{5}","\\d{7,9}"]
,[,,"NA","NA"]
,[,,"90\\d{6}","\\d{8}"]
,[,,"NA","NA"]
@ -3606,7 +3608,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"NZ":[,[,,"6[235-9]\\d{6}|[2-57-9]\\d{7,10}","\\d{7,11}"]
,[,,"(?:3[2-79]|[49][2-689]|6[235-9]|7[2-589])\\d{6}|24099\\d{3}","\\d{7,8}"]
,[,,"(?:3[2-79]|[49][2-689]|6[235-9]|7[2-5789])\\d{6}|24099\\d{3}","\\d{7,8}"]
,[,,"2(?:[028]\\d{7,8}|1(?:0\\d{5,7}|[12]\\d{5,6}|[3-9]\\d{5})|[79]\\d{7})","\\d{8,10}"]
,[,,"508\\d{6,7}|80\\d{6,8}","\\d{8,10}"]
,[,,"90\\d{7,9}","\\d{9,11}"]
@ -4686,7 +4688,7 @@ i18n.phonenumbers.metadata.countryToMetadata = {
]
,"TT":[,[,,"[589]\\d{9}","\\d{7}(?:\\d{3})?"]
,[,,"868(?:2(?:01|2[1-5])|6(?:07|1[4-6]|2[1-9]|[3-6]\\d|7[0-79]|9[0-8])|82[12])\\d{4}","\\d{7}(?:\\d{3})?"]
,[,,"868(?:29\\d|3(?:0[1-9]|1[02-9]|[2-9]\\d)|4(?:[679]\\d|8[0-4])|6(?:20|78|8\\d)|7(?:03|1[02-9]|[2-9]\\d))\\d{4}","\\d{10}"]
,[,,"868(?:2(?:8[59]|9\\d)|3(?:0[1-9]|1[02-9]|[2-9]\\d)|4(?:[679]\\d|8[0-4])|6(?:20|78|8\\d)|7(?:03|1[02-9]|[2-9]\\d))\\d{4}","\\d{10}"]
,[,,"8(?:00|55|66|77|88)[2-9]\\d{6}","\\d{10}"]
,[,,"900[2-9]\\d{6}","\\d{10}"]
,[,,"NA","NA"]
@ -4774,14 +4776,14 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,[,,"NA","NA"]
]
,"UG":[,[,,"\\d{9}","\\d{5,9}"]
,[,,"20(?:[014]\\d{2}|2(?:40|[5-9]\\d)|3[23]\\d|5[0-4]\\d)\\d{4}|[34]\\d{8}","\\d{5,9}"]
,[,,"7(?:0[0-7]|[15789]\\d|20|[46][0-4])\\d{6}","\\d{9}"]
,[,,"20(?:[0147]\\d{2}|2(?:40|[5-9]\\d)|3[23]\\d|5[0-4]\\d|60\\d|8[0-2]\\d)\\d{4}|[34]\\d{8}","\\d{5,9}"]
,[,,"7(?:0[0-7]|[15789]\\d|[23]0|[46][0-4])\\d{6}","\\d{9}"]
,[,,"800[123]\\d{5}","\\d{9}"]
,[,,"90[123]\\d{6}","\\d{9}"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{3})(\\d{6})","$1 $2",["[7-9]|20(?:[013-5]|2[5-9])|4(?:6[45]|[7-9])"]
,"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{3})(\\d{6})","$1 $2",["[7-9]|20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])"]
,"0$1","",0]
,[,"(\\d{2})(\\d{7})","$1 $2",["3|4(?:[1-5]|6[0-36-9])"]
,"0$1","",0]
@ -5084,33 +5086,33 @@ i18n.phonenumbers.metadata.countryToMetadata = {
,,[,,"(?:112|99[139])","\\d{3}"]
,[,,"NA","NA"]
]
,"ZW":[,[,,"2(?:[012457-9]\\d{3,8}|6\\d{3,6})|[13-79]\\d{4,8}|86\\d{8}","\\d{3,10}"]
,[,,"(?:1[3-9]|2(?:0[45]|[16]|2[28]|[49]8?|58[23]|7[246]|8[1346-9])|3(?:08?|17?|3[78]|[2456]|7[1569]|8[379])|5(?:[07-9]|1[78]|483|5(?:7?|8))|6(?:0|28|37?|[45][68][78]|98?)|848)\\d{3,6}|(?:2(?:27|5|7[135789]|8[25])|3[39]|5[1-46]|6[126-8])\\d{4,6}|2(?:0|70)\\d{5,6}|(?:4\\d|9[2-8])\\d{4,7}","\\d{3,10}"]
,[,,"7[137]\\d{7}|86(?:22|44)\\d{6}","\\d{9,10}"]
,[,,"NA","NA"]
,"ZW":[,[,,"2(?:[012457-9]\\d{3,8}|6\\d{3,6})|[13-79]\\d{4,8}|8[06]\\d{8}","\\d{3,10}"]
,[,,"(?:1[3-9]|2(?:0[45]|[16]|2[28]|[49]8?|58[23]|7[246]|8[1346-9])|3(?:08?|17?|3[78]|[2456]|7[1569]|8[379])|5(?:[07-9]|1[78]|483|5(?:7?|8))|6(?:0|28|37?|[45][68][78]|98?)|848)\\d{3,6}|(?:2(?:27|5|7[135789]|8[25])|3[39]|5[1-46]|6[126-8])\\d{4,6}|2(?:(?:0|70)\\d{5,6}|2[05]\\d{7})|(?:4\\d|9[2-8])\\d{4,7}","\\d{3,10}"]
,[,,"7[1378]\\d{7}|86(?:22|44)\\d{6}","\\d{9,10}"]
,[,,"800\\d{7}","\\d{10}"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"NA","NA"]
,[,,"86(?:1[12]|30|8[367]|99)\\d{6}","\\d{10}"]
,[,,"86(?:1[12]|30|55|77|8[367]|99)\\d{6}","\\d{10}"]
,"ZW",263,"00","0",,,"0",,,,[[,"([49])(\\d{3})(\\d{2,5})","$1 $2 $3",["4|9[2-9]"]
,"0$1","",0]
,[,"([179]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[19]1|7"]
,"0$1","",0]
,[,"(86\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["86[24]"]
,"0$1","",0]
,[,"([1-356]\\d)(\\d{3,5})","$1 $2",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,[,"([2356]\\d{2})(\\d{3,5})","$1 $2",["2(?:[278]|0[45]|[49]8)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])"]
,"0$1","",0]
,[,"([1-356]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:[278]|0[45]|48)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])|80"]
,"0$1","",0]
,[,"([2356]\\d{2})(\\d{3,5})","$1 $2",["2(?:[278]|0[45]|48)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])"]
,[,"([1-356]\\d)(\\d{3,5})","$1 $2",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,"0$1","",0]
,[,"([2356]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2(?:[278]|0[45]|48)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])"]
,[,"([1-356]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"]
,"0$1","",0]
,[,"([25]\\d{3})(\\d{3,5})","$1 $2",["(?:25|54)8","258[23]|5483"]
,"0$1","",0]
,[,"([25]\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["(?:25|54)8","258[23]|5483"]
,"0$1","",0]
,[,"(8\\d{3})(\\d{6})","$1 $2",["86[1389]"]
,[,"(8\\d{3})(\\d{6})","$1 $2",["86"]
,"0$1","",0]
]
,,[,,"NA","NA"]


+ 41
- 35
javascript/i18n/phonenumbers/phonenumberutil.js View File

@ -1623,59 +1623,65 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.formatNumberForMobileDialing =
}
/** @type {string} */
var formattedNumber;
var formattedNumber = '';
// Clear the extension, as that part cannot normally be dialed together with
// the main number.
/** @type {i18n.phonenumbers.PhoneNumber} */
var numberNoExt = number.clone();
numberNoExt.clearExtension();
/** @type {i18n.phonenumbers.PhoneNumberType} */
var numberType = this.getNumberType(numberNoExt);
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
if (regionCode == 'CO' && regionCallingFrom == 'CO') {
if (numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) {
if (regionCallingFrom == regionCode) {
/** @type {i18n.phonenumbers.PhoneNumberType} */
var numberType = this.getNumberType(numberNoExt);
var isFixedLineOrMobile =
(numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) ||
(numberType == i18n.phonenumbers.PhoneNumberType.MOBILE) ||
(numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE);
// Carrier codes may be needed in some countries. We handle this here.
if (regionCode == 'CO' &&
numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) {
formattedNumber = this.formatNationalNumberWithCarrierCode(
numberNoExt,
i18n.phonenumbers.PhoneNumberUtil
.COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX_);
} else if (regionCode == 'BR' && isFixedLineOrMobile) {
formattedNumber = numberNoExt.hasPreferredDomesticCarrierCode() ?
this.formatNationalNumberWithPreferredCarrierCode(numberNoExt, '') :
// Brazilian fixed line and mobile numbers need to be dialed with a
// carrier code when called within Brazil. Without that, most of the
// carriers won't connect the call. Because of that, we return an empty
// string here.
'';
} else {
// E164 doesn't work at all when dialing within Colombia.
formattedNumber = this.format(
// For NANPA countries, non-geographical countries, and Mexican fixed
// line and mobile numbers, we output international format for numbersi
// that can be dialed internationally as that always works.
if ((countryCallingCode ==
i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_ ||
regionCode ==
i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ||
// MX fixed line and mobile numbers should always be formatted in
// international format, even when dialed within MX. For national
// format to work, a carrier code needs to be used, and the correct
// carrier code depends on if the caller and callee are from the
// same local area. It is trickier to get that to work correctly than
// using international format, which is tested to work fine on all
// carriers.
(regionCode == 'MX' && isFixedLineOrMobile)) &&
this.canBeInternationallyDialled(numberNoExt)) {
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
} else {
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
}
} else if (regionCode == 'PE' && regionCallingFrom == 'PE') {
// In Peru, numbers cannot be dialled using E164 format from a mobile phone
// for Movistar. Instead they must be dialled in national format.
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
} else if (regionCode == 'AE' && regionCallingFrom == 'AE' &&
(numberType == i18n.phonenumbers.PhoneNumberType.UAN)) {
// In the United Arab Emirates, numbers with the prefix 600 (UAN numbers)
// cannot be dialled using E164 format. Instead they must be dialled in
// national format.
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
} else if (regionCode == 'BR' && regionCallingFrom == 'BR' &&
((numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) ||
(numberType == i18n.phonenumbers.PhoneNumberType.MOBILE) ||
(numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE))) {
formattedNumber = numberNoExt.hasPreferredDomesticCarrierCode() ?
this.formatNationalNumberWithPreferredCarrierCode(numberNoExt, '') :
// Brazilian fixed line and mobile numbers need to be dialed with a
// carrier code when called within Brazil. Without that, most of the
// carriers won't connect the call. Because of that, we return an empty
// string here.
'';
}
}
} else if (this.canBeInternationallyDialled(numberNoExt)) {
return withFormatting ?
this.format(numberNoExt,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL) :
this.format(numberNoExt, i18n.phonenumbers.PhoneNumberFormat.E164);
} else {
formattedNumber = (regionCallingFrom == regionCode) ?
this.format(numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL) :
'';
}
return withFormatting ?
formattedNumber :


+ 32
- 1
javascript/i18n/phonenumbers/phonenumberutil_test.js View File

@ -948,8 +948,24 @@ function testFormatWithPreferredCarrierCode() {
}
function testFormatNumberForMobileDialing() {
// Numbers are normally dialed in national format in-country, and
// international format from outside the country.
assertEquals('030123456',
phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.DE, false));
assertEquals('+4930123456',
phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.CH, false));
var deNumberWithExtn = DE_NUMBER.clone();
deNumberWithExtn.setExtension('1234');
assertEquals('030123456',
phoneUtil.formatNumberForMobileDialing(deNumberWithExtn, RegionCode.DE,
false));
assertEquals('+4930123456',
phoneUtil.formatNumberForMobileDialing(deNumberWithExtn, RegionCode.CH,
false));
// US toll free numbers are marked as noInternationalDialling in the test
// metadata for testing purposes.
// metadata for testing purposes. For such numbers, we expect nothing to be
// returned when the region code is not the same one.
assertEquals('800 253 0000',
phoneUtil.formatNumberForMobileDialing(US_TOLLFREE, RegionCode.US, true));
assertEquals('',
@ -1005,6 +1021,21 @@ function testFormatNumberForMobileDialing() {
phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.JP, false));
assertEquals('600123456',
phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.AE, false));
assertEquals('+523312345678',
phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.MX,
false));
assertEquals('+523312345678',
phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.US,
false));
// Non-geographical numbers should always be dialed in international format.
assertEquals('+80012345678',
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE,
RegionCode.US, false));
assertEquals('+80012345678',
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE,
RegionCode.UN001, false));
}
function testFormatByPattern() {


+ 142
- 99
resources/PhoneNumberMetaData.xml View File

@ -2628,8 +2628,8 @@
(?:
6(?:
[056]\d|
1[0-3]|
8[0-2]|
1[0-367]|
8[0-3]|
90
)|
7(?:
@ -4039,6 +4039,10 @@
<territory id="CD" countryCode="243" internationalPrefix="00"
nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
<availableFormats>
<numberFormat pattern="(\d{2})(\d{3})(\d{4})">
<leadingDigits>12</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
<numberFormat pattern="([89]\d{2})(\d{3})(\d{3})">
<leadingDigits>
8[0-259]|
@ -4057,15 +4061,20 @@
</availableFormats>
<generalDesc>
<nationalNumberPattern>
[1-6]\d{6}|
8\d{6,8}|
[2-6]\d{6}|
[18]\d{6,8}|
9\d{8}
</nationalNumberPattern>
<possibleNumberPattern>\d{7,9}</possibleNumberPattern>
</generalDesc>
<fixedLine>
<nationalNumberPattern>[1-6]\d{6}</nationalNumberPattern>
<possibleNumberPattern>\d{7}</possibleNumberPattern>
<nationalNumberPattern>
1(?:
2\d{7}|
\d{6}
)|
[2-6]\d{6}
</nationalNumberPattern>
<exampleNumber>1234567</exampleNumber>
</fixedLine>
<mobile>
@ -4627,7 +4636,10 @@
6[09]|
91
)|
898
8(?:
71|
98
)
</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
@ -4676,8 +4688,9 @@
8(?:
1[236-8]|
2[5-7]|
[37]|
3|
5[1-9]|
7[02-9]|
8[3678]|
9[1-7]
)|
@ -4730,8 +4743,9 @@
</noInternationalDialling>
<fixedLine>
<!-- 0432 increased to 8 digits on October 24, 2009. 0791 increased to 8 digits on August
28, 2011. 0551 increased to 8 digits and 0565 was cancelled on Dec 8, 2012. 0475 is
the prefix for Tongliao but is not in the ITU data. -->
28, 2011. 0551 increased to 8 digits and 0565 was cancelled on Dec 8, 2012. 0871
increased to 8 digits on December 16, 2012. 0475 is the prefix for Tongliao but is not
in the ITU data. -->
<nationalNumberPattern>
21\d{8,10}|
(?:
@ -4759,7 +4773,10 @@
6[09]|
91
)|
898
8(?:
71|
98
)
)\d{8}|
(?:
3(?:
@ -4806,8 +4823,9 @@
8(?:
1[236-8]|
2[5-7]|
[37]\d|
3\d|
5[1-9]|
7[02-9]|
8[3678]|
9[1-7]
)|
@ -5517,7 +5535,7 @@
numbers are reachable by the public. -->
<nationalNumberPattern>
9(?:
5[056]|
5\d|
7[234]
)\d{6}
</nationalNumberPattern>
@ -8769,7 +8787,7 @@
<format>$1 $2 $3 $4</format>
</numberFormat>
<numberFormat pattern="(\d{3})(\d{2})(\d{2})(\d{2})">
<leadingDigits>62</leadingDigits>
<leadingDigits>6[02356]</leadingDigits>
<format>$1 $2 $3 $4</format>
</numberFormat>
</availableFormats>
@ -8794,12 +8812,9 @@
</fixedLine>
<mobile>
<!-- WiMAX is in the plan - which is a wireless broadband protocol. Not including this in
the metadata for now unless this proves to be necessary. These would start with 79. We
are also allowing an extra digit for numbers beginning with 62, since Orange is
apparently moving their 62 and 68 ranges both to 62 and adding an extra digit.
Extra prefixes 24, 66 and 69 have been added for MTN Guinée, as notified by an
opensource contributor and matched by numbers found online. 61[0-5] is assigned to
Orange. -->
the metadata for now unless this proves to be necessary. These would start with 79.
61[0-5] is assigned to Orange. Also includes the new 9-digit mobile numbers that are
coming into effect on March 29, 2013. -->
<nationalNumberPattern>
(?:
24|
@ -8812,13 +8827,19 @@
5[2457-9]
)|
1[0-5]\d|
2\d{2,3}|
2\d{2}|
[4-9]\d{2}|
3(?:
[14]0|
35
)
)\d{4}
)\d{4}|
6(?:
[03]1|
2[128]|
5[57]|
6[2469]
)\d{6}
</nationalNumberPattern>
<exampleNumber>60201234</exampleNumber>
</mobile>
@ -11256,8 +11277,8 @@
<leadingDigits>21</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
<numberFormat pattern="(21)(\d{4})(\d{4})">
<leadingDigits>21</leadingDigits>
<numberFormat pattern="(2[16])(\d{4})(\d{4})">
<leadingDigits>2[16]</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
<numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
@ -13281,7 +13302,7 @@
<exampleNumber>601234567</exampleNumber>
</personalNumber>
<voip>
<nationalNumberPattern>50\d{8}</nationalNumberPattern>
<nationalNumberPattern>50[1-9]\d{7}</nationalNumberPattern>
<possibleNumberPattern>\d{10}</possibleNumberPattern>
<exampleNumber>5012345678</exampleNumber>
</voip>
@ -14009,12 +14030,14 @@
<possibleNumberPattern>\d{4,10}</possibleNumberPattern>
</generalDesc>
<fixedLine>
<!-- We omit 049, supposedly for Kaesong Industrial Region, since real numbers can't be
found, and it is in North Korea anyway. -->
<nationalNumberPattern>
(?:
2|
[34][1-3]|
5[1-5]|
6[1-4]
3[1-3]|
[46][1-4]|
5[1-5]
)(?:
1\d{2,3}|
[2-9]\d{6,7}
@ -14024,10 +14047,15 @@
<exampleNumber>22123456</exampleNumber>
</fixedLine>
<mobile>
<nationalNumberPattern>1[0-25-9]\d{7,8}</nationalNumberPattern>
<nationalNumberPattern>1[0-26-9]\d{7,8}</nationalNumberPattern>
<possibleNumberPattern>\d{9,10}</possibleNumberPattern>
<exampleNumber>1023456789</exampleNumber>
</mobile>
<pager>
<nationalNumberPattern>15\d{7,8}</nationalNumberPattern>
<possibleNumberPattern>\d{9,10}</possibleNumberPattern>
<exampleNumber>1523456789</exampleNumber>
</pager>
<tollFree>
<nationalNumberPattern>80\d{7}</nationalNumberPattern>
<possibleNumberPattern>\d{9}</possibleNumberPattern>
@ -14120,13 +14148,13 @@
<possibleNumberPattern>\d{7,8}</possibleNumberPattern>
<exampleNumber>22345678</exampleNumber>
</fixedLine>
<!-- Note that the mobile ranges starting 50[34] are not specified in the ITU documentation,
but can be found online as of Dec 2012. -->
<mobile>
<!-- The mention of the mobile range 6933 0000 - 6969 9999 seems to be
a mistake in the ITU plan, and should be 6933 0000 - 6933 9999. -->
<nationalNumberPattern>
(?:
5(?:
11|
1[0-2]|
[05]\d
)|
6(?:
@ -14134,12 +14162,12 @@
5[015-9]|
6\d|
7[067]|
9[069]
9[0369]
)|
9(?:
0[09]|
4[049]|
6[69]|
6[069]|
[79]\d
)
)\d{5}
@ -14955,16 +14983,13 @@
<mobile>
<!-- According to information from Lonestar Communications Corporation, the prefix 6 is
being removed, but as of June 2012 is in parallel running with their new prefix 88.
It seems some numbers beginning with 77[67] are also 9 digits long now. -->
According to Cellcom Liberia, they have issued 9 digit numbers starting with 77. -->
<nationalNumberPattern>
(?:
4[67]|
5\d|
6[4-8]|
7(?:
7[67]\d|
\d{2}
)|
77?\d{2}|
88\d{2}
)\d{5}
</nationalNumberPattern>
@ -18533,12 +18558,14 @@
<possibleNumberPattern>\d{7,11}</possibleNumberPattern>
</generalDesc>
<fixedLine>
<!-- 07 788 was assigned to Voxbox according to
http://www.nad.org.nz/07GeographicalCodes.php -->
<nationalNumberPattern>
(?:
3[2-79]|
[49][2-689]|
6[235-9]|
7[2-589]
7[2-5789]
)\d{6}|
24099\d{3}
</nationalNumberPattern>
@ -22996,7 +23023,10 @@
<!-- Adding 703 as messages have been successfully delivered to phones with this prefix. -->
<nationalNumberPattern>
868(?:
29\d|
2(?:
8[59]|
9\d
)|
3(?:
0[1-9]|
1[02-9]|
@ -23411,7 +23441,7 @@
<leadingDigits>
[7-9]|
20(?:
[013-5]|
[013-8]|
2[5-9]
)|
4(?:
@ -23441,16 +23471,18 @@
<possibleNumberPattern>\d{5,9}</possibleNumberPattern>
</generalDesc>
<fixedLine>
<!-- Ranges with prefixes 20[35] are "not yet operational" as of Feb. 2012. -->
<!-- Ranges with prefixes 20[5-8] are "not yet operational" as of Feb. 2013. -->
<nationalNumberPattern>
20(?:
[014]\d{2}|
[0147]\d{2}|
2(?:
40|
[5-9]\d
)|
3[23]\d|
5[0-4]\d
5[0-4]\d|
60\d|
8[0-2]\d
)\d{4}|
[34]\d{8}
</nationalNumberPattern>
@ -23461,12 +23493,12 @@
</fixedLine>
<mobile>
<!-- Added 79[5-9] and 707 from online numbers found with this prefix. -->
<!-- Ranges with prefixes 7[246] are "not yet operational" as of Nov. 2011. -->
<!-- Ranges with prefixes 7[2346] are "not yet operational" as of Jan. 2013. -->
<nationalNumberPattern>
7(?:
0[0-7]|
[15789]\d|
20|
[23]0|
[46][0-4]
)\d{6}
</nationalNumberPattern>
@ -25183,6 +25215,52 @@
<leadingDigits>86[24]</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
<!-- Three-digit area codes (listed before the two-digit ones since some overlap) -->
<numberFormat pattern="([2356]\d{2})(\d{3,5})">
<leadingDigits>
2(?:
[278]|
0[45]|
[49]8
)|
3(?:
08|
17|
3[78]|
[78]
)|
5[15][78]|
6(?:
[29]8|
37|
[68][78]
)
</leadingDigits>
<format>$1 $2</format>
</numberFormat>
<numberFormat pattern="(\d{3})(\d{3})(\d{3,4})">
<leadingDigits>
2(?:
[278]|
0[45]|
48
)|
3(?:
08|
17|
3[78]|
[78]
)|
5[15][78]|
6(?:
[29]8|
37|
[68][78]
)|
80
</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
<!-- Two-digit area codes -->
<numberFormat pattern="([1-356]\d)(\d{3,5})">
<leadingDigits>
@ -25238,51 +25316,6 @@
</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
<!-- Three-digit area codes -->
<numberFormat pattern="([2356]\d{2})(\d{3,5})">
<leadingDigits>
2(?:
[278]|
0[45]|
48
)|
3(?:
08|
17|
3[78]|
[78]
)|
5[15][78]|
6(?:
[29]8|
37|
[68][78]
)
</leadingDigits>
<format>$1 $2</format>
</numberFormat>
<numberFormat pattern="([2356]\d{2})(\d{3})(\d{3})">
<leadingDigits>
2(?:
[278]|
0[45]|
48
)|
3(?:
08|
17|
3[78]|
[78]
)|
5[15][78]|
6(?:
[29]8|
37|
[68][78]
)
</leadingDigits>
<format>$1 $2 $3</format>
</numberFormat>
<!-- Four-digit area codes -->
<numberFormat pattern="([25]\d{3})(\d{3,5})">
<leadingDigits>
@ -25312,7 +25345,7 @@
</numberFormat>
<!-- VOIP numbers -->
<numberFormat pattern="(8\d{3})(\d{6})">
<leadingDigits>86[1389]</leadingDigits>
<leadingDigits>86</leadingDigits>
<format>$1 $2</format>
</numberFormat>
</availableFormats>
@ -25325,7 +25358,7 @@
6\d{3,6}
)|
[13-79]\d{4,8}|
86\d{8}
8[06]\d{8}
</nationalNumberPattern>
<possibleNumberPattern>\d{3,10}</possibleNumberPattern>
</generalDesc>
@ -25381,9 +25414,12 @@
6[126-8]
)\d{4,6}|
2(?:
0|
70
)\d{5,6}|
(?:
0|
70
)\d{5,6}|
2[05]\d{7}
)|
(?:
4\d|
9[2-8]
@ -25395,7 +25431,7 @@
also being used by the carriers as mobile prefixes. -->
<mobile>
<nationalNumberPattern>
7[137]\d{7}|
7[1378]\d{7}|
86(?:
22|
44
@ -25404,12 +25440,19 @@
<possibleNumberPattern>\d{9,10}</possibleNumberPattern>
<exampleNumber>711234567</exampleNumber>
</mobile>
<!-- No tollFree or premiumRate information can be found. -->
<tollFree>
<nationalNumberPattern>800\d{7}</nationalNumberPattern>
<possibleNumberPattern>\d{10}</possibleNumberPattern>
<exampleNumber>8001234567</exampleNumber>
</tollFree>
<!-- No premiumRate information can be found. -->
<voip>
<nationalNumberPattern>
86(?:
1[12]|
30|
55|
77|
8[367]|
99
)\d{6}


+ 35
- 0
resources/geocoding/cs/82.txt View File

@ -0,0 +1,35 @@
# Copyright (C) 2013 The Libphonenumber Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Translated from en/82.txt file using Wikipedia
# (http://cs.wikipedia.org/wiki/Ji%C5%BEn%C3%AD_Korea).
# Sejong was not listed, but Sedžong is apparently used on the internet.
822|Soul
8231|Gjŏnggi
8232|Inčchon
8233|Kangwon
8241|Jižní Čchungčchong
8242|Tedžon
8243|Severní Čchungčchong
8244|Sedžong
8251|Pusan
8252|Ulsan
8253|Tegu
8254|Severní Kjongsang
8255|Jižní Kjongsang
8261|Jižní Čolla
8262|Kwangdžu
8263|Severní Čolla
8264|Čedžu

+ 60
- 27
resources/geocoding/en/263.txt View File

@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated from:
# http://en.wikipedia.org/wiki/+263 [410798684]
# Generated from the ITU plan published 12th December 2012. The Wikipedia page
# has many errors since it is based on the area codes before 2009.
# The spelling of "Shanagani" has been corrected to "Shangani".
26313|Victoria Falls
26314|Rutenga
@ -22,30 +23,74 @@
26317|Filabusi
26318|Dete
26320|Mutare
263204|Odzi
263205|Pengalonga
26321|Murambinda
26322|Wedza
263220|Mutare
263222|Wedza
263225|Rusape
263227|Chipinge
263228|Hauna
26324|Chipangayi
263248|Birchenough Bridge
26325|Rusape
2632582|Headlands
2632583|Nyazura
26326|Chimanimani
26327|Chipinge
26328|Hauna
263270|Chitungwiza
263271|Bindura
263272|Mutoko
263273|Ruwa
263274|Arcturus
263275|Mazowe
263276|Mt. Darwin
263277|Mvurwi
263278|Murewa
263279|Marondera
263280|Plumtree
263281|Hwange
263282|Kezi
263283|Figtree
263284|Gwanda
263285|Turkmine
263286|Beitbridge
263287|Nyamandhlovu
263288|Esigodini
263289|Jotsholo
26329|Juliasdale
263298|Nyanga
26330|Gutu
263308|Chatsworth
26331|Chiredzi
263317|Checheche
26332|Mvuma
26333|Triangle
263337|Nyaningwe
263338|Nyika
26334|Jerera
26335|Mashava
26336|Ngundu
26338|Nyika
26339|Masvingo (Ft. Victoria)
263371|Shamva
263375|Concession
263376|Glendale
263379|Macheke
263383|Matopos
263387|Tsholotsho
26339|Masvingo
263398|Lupane
2634|Harare
26342729|Marondera
26350|Shangani
26351|Zvishavane
263516|Mberengwa
263517|Mataga
26352|Shurugwi
26353|Chegutu
26354|Gweru
2635483|Lalapanzi
26355|Kwekwe
263557|Munyati
263558|Nkayi
26356|Chivhu
26357|Centenary
26358|Guruve
@ -53,31 +98,19 @@
26360|Mhangura
26361|Kariba
26362|Norton
263628|Selous
26363|Makuti
263637|Chirundu
26364|Karoi
26365|Beatrice
26366|Banket
263667|Raffingora
263668|Mutorashanga
26367|Chinhoyi
263675|Murombedzi
26368|Kadoma
263687|Sanyati
263688|Chakari
26369|Darwendale
26370|Chitungwiza
26371|Bindura
26372|Mutoku
26373|Ruwa
26374|Arcturus
26375|Mazowe
26376|Mount Darwin
26377|Mvurwi
26378|Murewa
26379|Marondera
26380|Plumtree
26381|Hwange
26382|Kezi
26383|Figtree
26384|Gwanda
26385|Turk Mine
26386|Beitbridge
26387|Nyamandhlovu
26388|Esigodini
26389|Jotsholo
263698|Trelawney
2639|Bulawayo

+ 1
- 0
resources/geocoding/en/82.txt View File

@ -23,6 +23,7 @@
8241|Chungnam
8242|Daejeon
8243|Chungbuk
8244|Sejong City
8251|Busan
8252|Ulsan
8253|Daegu


+ 4
- 3
resources/geocoding/en/98.txt View File

@ -14,6 +14,8 @@
# Generated from:
# http://www.itu.int/oth/T0202000066/en [2012-07-24]
# Numbering Plan received from Sony Ericsson [2012-04]
# Some names were changed to the more common English spelling.
98111|Babol
98112|Babol suburbs
@ -54,8 +56,7 @@
98252|Qom suburbs
98255|Saveh
98256|Saveh suburbs
98261|Karaj
98262|Karaj suburbs
9826|Karaj
98273|Shahroud
98274|Shahroud suburbs
98281|Qazvin
@ -151,7 +152,7 @@
98651|Sarbandar
98652|Sarbandar suburbs
98661|Khorramabad
98662|Brojerd
98662|Borujerd
98663|Khoramabad suburbs
98664|Aligudarz
98665|Borujerd suburbs


+ 1
- 2
resources/geocoding/fa/98.txt View File

@ -54,8 +54,7 @@
98252|حومهٔ قم
98255|ساوه
98256|حومهٔ ساوه
98261|کرج
98262|حومهٔ کرج
9826|کرج
98273|شاهرود
98274|حومهٔ شاهرود
98281|قزوین


+ 1
- 0
resources/geocoding/fr/82.txt View File

@ -21,6 +21,7 @@
8241|Chungcheong du Sud
8242|Daejeon
8243|Chungcheong du Nord
8244|Sejong (ville)
8251|Busan
8252|Ulsan
8253|Daegu


+ 1
- 0
resources/geocoding/ko/82.txt View File

@ -23,6 +23,7 @@
8241|충남
8242|대전
8243|충북
8244|세종
8251|부산
8252|울산
8253|대구


+ 1
- 0
resources/geocoding/zh/82.txt View File

@ -23,6 +23,7 @@
8241|忠淸南道
8242|大田市
8243|忠淸北道
8244|世宗市
8251|釜山市
8252|蔚山市
8253|大邱市


+ 1
- 0
resources/geocoding/zh_Hant/82.txt View File

@ -23,6 +23,7 @@
8241|忠清南道
8242|大田廣
8243|忠清北道
8244|世宗市
8251|釜山廣
8252|蔚山廣
8253|大邱廣


Loading…
Cancel
Save