Skip to content

Commit 795e0b7

Browse files
authored
Merge pull request #638 from giggsey/upstream-8.13.40
Upstream metadata changes from Google for v8.13.40
2 parents f662a7e + 8df4d31 commit 795e0b7

22 files changed

+64
-32
lines changed

METADATA-VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# It can be a commit, branch or tag of the https://github.com/google/libphonenumber project
33
#
44
# For more information, look at the phing tasks in build.xml
5-
v8.13.39
5+
v8.13.40

src/PhoneNumberUtil.php

+16-2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ class PhoneNumberUtil
164164
*/
165165
protected static $GEO_MOBILE_COUNTRIES_WITHOUT_MOBILE_AREA_CODES;
166166

167+
/**
168+
* Set of country codes that doesn't have national prefix, but it has area codes.
169+
*
170+
* @var array
171+
*/
172+
protected static $COUNTRIES_WITHOUT_NATIONAL_PREFIX_WITH_AREA_CODES;
173+
167174
/**
168175
* Set of country calling codes that have geographically assigned mobile numbers. This may not be
169176
* complete; we add calling codes case by case, as we find geographical mobile numbers or hear
@@ -400,6 +407,9 @@ protected function __construct(MetadataSourceInterface $metadataSource, $country
400407
static::$GEO_MOBILE_COUNTRIES_WITHOUT_MOBILE_AREA_CODES = array();
401408
static::$GEO_MOBILE_COUNTRIES_WITHOUT_MOBILE_AREA_CODES[] = 86; // China
402409

410+
static::$COUNTRIES_WITHOUT_NATIONAL_PREFIX_WITH_AREA_CODES = array();
411+
static::$COUNTRIES_WITHOUT_NATIONAL_PREFIX_WITH_AREA_CODES[] = 52; // Mexico
412+
403413
static::$GEO_MOBILE_COUNTRIES = array();
404414
static::$GEO_MOBILE_COUNTRIES[] = 52; // Mexico
405415
static::$GEO_MOBILE_COUNTRIES[] = 54; // Argentina
@@ -873,14 +883,18 @@ public function getLengthOfGeographicalAreaCode(PhoneNumber $number)
873883
if ($metadata === null) {
874884
return 0;
875885
}
886+
887+
$countryCallingCode = $number->getCountryCode();
888+
876889
// If a country doesn't use a national prefix, and this number doesn't have an Italian leading
877890
// zero, we assume it is a closed dialling plan with no area codes.
878-
if (!$metadata->hasNationalPrefix() && !$number->isItalianLeadingZero()) {
891+
// Note:this is our general assumption, but there are exceptions which are tracked in
892+
// COUNTRIES_WITHOUT_NATIONAL_PREFIX_WITH_AREA_CODES.
893+
if (!$metadata->hasNationalPrefix() && !$number->isItalianLeadingZero() && !in_array($countryCallingCode, self::$COUNTRIES_WITHOUT_NATIONAL_PREFIX_WITH_AREA_CODES)) {
879894
return 0;
880895
}
881896

882897
$type = $this->getNumberType($number);
883-
$countryCallingCode = $number->getCountryCode();
884898

885899
if ($type === PhoneNumberType::MOBILE
886900
// Note this is a rough heuristic; it doesn't cover Indonesia well, for example, where area

src/carrier/data/en/230.php

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
230701 => 'Emtel',
5555
230702 => 'MTML',
5656
230703 => 'Emtel',
57+
230704 => 'Emtel',
5758
230730 => 'Emtel',
5859
230731 => 'MTML',
5960
230733 => 'Cellplus',

src/carrier/data/en/235.php

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
return array (
1414
2356 => 'Airtel',
1515
2357 => 'Sotel',
16+
2358 => 'Airtel',
1617
2359 => 'Tigo',
1718
);

src/carrier/data/en/592.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,17 @@
5252
592720 => 'E-Networks',
5353
592721 => 'Digicel Guyana',
5454
592722 => 'Digicel Guyana',
55+
592723 => 'Digicel Guyana',
56+
592724 => 'Digicel Guyana',
5557
592725 => 'GTT',
5658
592726 => 'GTT',
5759
592727 => 'GTT',
5860
592728 => 'GTT',
5961
59273 => 'E-Networks',
62+
59274 => 'Digicel Guyana',
6063
592740 => 'E-Networks',
6164
592741 => 'E-Networks',
6265
592742 => 'E-Networks',
63-
592749 => 'GTT',
6466
59275 => 'GTT',
67+
592750 => 'Digicel Guyana',
6568
);

src/carrier/data/en/852.php

+14-12
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
return array (
1414
852440 => 'China Mobile',
1515
852441 => 'HKT',
16-
852442 => 'Hutchison Telecom.',
16+
852442 => 'Hutchison Telecom',
1717
852443 => 'HKT',
1818
852444 => 'HKT',
19-
8524441 => 'Hutchison Telecom.',
20-
8524442 => 'Hutchison Telecom.',
19+
8524441 => 'Hutchison Telecom',
20+
8524442 => 'Hutchison Telecom',
2121
852445 => 'HKT',
22-
852446 => 'Hutchison Telecom.',
22+
852446 => 'Hutchison Telecom',
2323
852447 => 'China Mobile',
24-
852448 => 'Hutchison Telecom.',
24+
852448 => 'Hutchison Telecom',
2525
852460 => 'China Unicom',
2626
8524607 => 'Multibyte',
2727
8524608 => 'HKT',
@@ -71,6 +71,7 @@
7171
852468 => 'China Mobile',
7272
852469 => 'China Mobile',
7373
8524699 => 'South China Telecommunications',
74+
85247 => 'Hutchison Telecom',
7475
852510 => 'China Mobile',
7576
852511 => 'HKT',
7677
852512 => 'China Mobile',
@@ -288,19 +289,20 @@
288289
852697 => 'HKT',
289290
852699 => 'China Mobile',
290291
852701 => 'China Mobile',
291-
852702 => 'Hutchison Telecom.',
292+
852702 => 'Hutchison Telecom',
293+
852703 => 'Hutchison Telecom',
292294
8527071 => 'SmarTone',
293295
8527072 => 'SmarTone',
294296
8527073 => 'SmarTone',
295297
8527074 => 'SmarTone',
296298
8527075 => 'SmarTone',
297299
8527076 => 'China Mobile',
298-
8527077 => 'Hutchison Telecom.',
299-
8527078 => 'Hutchison Telecom.',
300+
8527077 => 'Hutchison Telecom',
301+
8527078 => 'Hutchison Telecom',
300302
852708 => 'HKT',
301-
852709 => 'Hutchison Telecom.',
303+
852709 => 'Hutchison Telecom',
302304
852840 => 'China Mobile',
303-
852841 => 'Hutchison Telecom.',
305+
852841 => 'Hutchison Telecom',
304306
852842 => 'HKT',
305307
8528480 => 'HKT',
306308
8528481 => 'HKT',
@@ -315,8 +317,8 @@
315317
852901 => 'SmarTone',
316318
852902 => 'HKT',
317319
852903 => 'HKT',
318-
852904 => 'Hutchison Telecom.',
319-
852905 => 'Hutchison Telecom.',
320+
852904 => 'Hutchison Telecom',
321+
852905 => 'Hutchison Telecom',
320322
852906 => 'China Mobile',
321323
852907 => 'HKT',
322324
852908 => 'HKT',

src/carrier/data/en/880.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
88013 => 'Grameenphone',
1616
88014 => 'Banglalink',
1717
88015 => 'TeleTalk',
18-
88016 => 'Airtel',
18+
88016 => 'Robi',
1919
88017 => 'Grameenphone',
2020
88018 => 'Robi',
2121
88019 => 'Banglalink',

src/carrier/data/en/995.php

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
99550090 => 'Cellfie',
3838
99550099 => 'Silknet',
3939
995501 => 'Cellfie',
40+
995502 => 'Silknet',
4041
9955050 => 'Silknet',
4142
9955055 => 'MagtiCom',
4243
995507 => 'Globalcell',

src/carrier/data/zh/852.php

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
852468 => '中国移动',
7171
852469 => '中国移动',
7272
8524699 => '中國南方電信(香港)有限公司',
73+
85247 => '和記電話有限公司',
7374
852510 => '中国移动',
7475
852511 => '香港移动通讯',
7576
852512 => '中国移动',
@@ -253,6 +254,7 @@
253254
852699 => '中国移动',
254255
852701 => '中国移动',
255256
852702 => '和記電話有限公司',
257+
852703 => '和記電話有限公司',
256258
8527071 => '数码通',
257259
8527072 => '数码通',
258260
8527073 => '数码通',

src/data/PhoneNumberMetadata_FI.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
),
3333
'fixedLine' =>
3434
array (
35-
'NationalNumberPattern' => '(?:1[3-79][1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}',
35+
'NationalNumberPattern' => '1[35-7][1-8]\\d{3,6}|(?:1[49][1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}',
3636
'ExampleNumber' => '131234567',
3737
'PossibleLength' =>
3838
array (
@@ -247,7 +247,7 @@
247247
'format' => '$1 $2',
248248
'leadingDigitsPatterns' =>
249249
array (
250-
0 => '(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9',
250+
0 => '(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9',
251251
),
252252
'nationalPrefixFormattingRule' => '0$1',
253253
'domesticCarrierCodeFormattingRule' => '',
@@ -310,7 +310,7 @@
310310
'format' => '$1 $2',
311311
'leadingDigitsPatterns' =>
312312
array (
313-
0 => '(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9',
313+
0 => '(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9',
314314
),
315315
'nationalPrefixFormattingRule' => '0$1',
316316
'domesticCarrierCodeFormattingRule' => '',

src/data/PhoneNumberMetadata_GE.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
),
4141
'mobile' =>
4242
array (
43-
'NationalNumberPattern' => '5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|111|77\\d)|1(?:1(?:[03][01]|[124]\\d)|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}',
43+
'NationalNumberPattern' => '5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|111|22[02]|77\\d)|1(?:1(?:[03][01]|[124]\\d)|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}',
4444
'ExampleNumber' => '555123456',
4545
'PossibleLength' =>
4646
array (

src/data/PhoneNumberMetadata_GY.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
),
3737
'mobile' =>
3838
array (
39-
'NationalNumberPattern' => '(?:510|6\\d\\d|7(?:[013]\\d|2[0-25-8]|4[0-29]|5[1-9]))\\d{4}',
39+
'NationalNumberPattern' => '(?:510|6\\d\\d|7(?:[0135]\\d|2[0-8]|4[0-24-9]))\\d{4}',
4040
'ExampleNumber' => '6091234',
4141
'PossibleLength' =>
4242
array (

src/data/PhoneNumberMetadata_HK.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
),
4343
'mobile' =>
4444
array (
45-
'NationalNumberPattern' => '(?:4(?:44[0-25-9]|6(?:1[0-7]|4[0-57-9]|6[0-4]))|5(?:73[0-6]|95[0-8])|6(?:26[013-8]|66[0-3])|70(?:7[1-8]|8[0-4])|848[0-35-9]|9(?:29[013-9]|39[01]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-8]|6[02357-9])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[129]|84[0-29]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}',
45+
'NationalNumberPattern' => '(?:4(?:44[0-25-9]|6(?:1[0-7]|4[0-57-9]|6[0-4]))|5(?:73[0-6]|95[0-8])|6(?:26[013-8]|66[0-3])|70(?:7[1-8]|8[0-4])|848[0-35-9]|9(?:29[013-9]|39[01]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-8]|6[02357-9]|70)|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-39]|84[0-29]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}',
4646
'ExampleNumber' => '51234567',
4747
'PossibleLength' =>
4848
array (

src/data/PhoneNumberMetadata_IL.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
),
106106
'voip' =>
107107
array (
108-
'NationalNumberPattern' => '7(?:38(?:0\\d|5[0-29]|88)|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}',
108+
'NationalNumberPattern' => '7(?:38(?:0\\d|5[0-259]|88)|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}',
109109
'ExampleNumber' => '771234567',
110110
'PossibleLength' =>
111111
array (

src/data/PhoneNumberMetadata_MU.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
),
4141
'mobile' =>
4242
array (
43-
'NationalNumberPattern' => '5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-3]|3[013]))\\d{5}',
43+
'NationalNumberPattern' => '5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-4]|3[013]))\\d{5}',
4444
'ExampleNumber' => '52512345',
4545
'PossibleLength' =>
4646
array (

src/data/PhoneNumberMetadata_MX.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
),
2828
'fixedLine' =>
2929
array (
30-
'NationalNumberPattern' => '657[12]\\d{6}|(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[25-7][1-9]|3[1-8]|4\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}',
30+
'NationalNumberPattern' => '657[12]\\d{6}|(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[25-7][1-9]|3[1-8]|4\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}',
3131
'ExampleNumber' => '2001234567',
3232
'PossibleLength' =>
3333
array (
@@ -40,7 +40,7 @@
4040
),
4141
'mobile' =>
4242
array (
43-
'NationalNumberPattern' => '657[12]\\d{6}|(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[25-7][1-9]|3[1-8]|4\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}',
43+
'NationalNumberPattern' => '657[12]\\d{6}|(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[25-7][1-9]|3[1-8]|4\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}',
4444
'ExampleNumber' => '2221234567',
4545
'PossibleLength' =>
4646
array (

src/data/PhoneNumberMetadata_TD.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
return array (
1515
'generalDesc' =>
1616
array (
17-
'NationalNumberPattern' => '(?:22|[69]\\d|77)\\d{6}',
17+
'NationalNumberPattern' => '(?:22|[689]\\d|77)\\d{6}',
1818
'PossibleLength' =>
1919
array (
2020
0 => 8,
@@ -36,7 +36,7 @@
3636
),
3737
'mobile' =>
3838
array (
39-
'NationalNumberPattern' => '(?:6[0-689]|77|9\\d)\\d{6}',
39+
'NationalNumberPattern' => '(?:[69]\\d|77|8[56])\\d{6}',
4040
'ExampleNumber' => '63012345',
4141
'PossibleLength' =>
4242
array (
@@ -148,7 +148,7 @@
148148
'format' => '$1 $2 $3 $4',
149149
'leadingDigitsPatterns' =>
150150
array (
151-
0 => '[2679]',
151+
0 => '[26-9]',
152152
),
153153
'nationalPrefixFormattingRule' => '',
154154
'domesticCarrierCodeFormattingRule' => '',

src/data/ShortNumberMetadata_FI.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
),
6363
'shortCode' =>
6464
array (
65-
'NationalNumberPattern' => '11(?:2|6(?:00[06]|1(?:1[17]|23)))|75[12]\\d\\d',
65+
'NationalNumberPattern' => '11(?:2|6(?:00[06]|1(?:1[17]|23)))|(?:1[235-8]\\d|75[12])\\d\\d',
6666
'ExampleNumber' => '112',
6767
'PossibleLength' =>
6868
array (
@@ -73,9 +73,11 @@
7373
),
7474
'standardRate' =>
7575
array (
76+
'NationalNumberPattern' => '1[235-8]\\d{3}',
77+
'ExampleNumber' => '12000',
7678
'PossibleLength' =>
7779
array (
78-
0 => -1,
80+
0 => 5,
7981
),
8082
'PossibleLengthLocalOnly' =>
8183
array (

src/geocoding/data/en/52.php

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
526572 => 'Juarez/Chihuahua',
225225
52658 => 'Baja California',
226226
52659 => 'Chihuahua',
227+
52660 => 'Culiacan',
227228
52661 => 'Primo Tapia/Rosarito, BCN',
228229
52662 => 'Sonora',
229230
52665 => 'Tecate, BCN',

src/geocoding/data/es/52.php

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
52632 => 'Ímuris/Magdalena, SON',
7070
52641 => 'Benjamín Hill/Santa Ana, SON',
7171
52653 => 'Luis B. Sánchez/San Luis Río Colorado, SON',
72+
52660 => 'Culiacán',
7273
52711 => 'México/Michoacán',
7374
52712 => 'Estado de México',
7475
52714 => 'Estado de México',

src/timezone/data/map_data.php

+1
Original file line numberDiff line numberDiff line change
@@ -2307,6 +2307,7 @@
23072307
52657 => 'America/Mazatlan',
23082308
52658 => 'America/Tijuana',
23092309
52659 => 'America/Mazatlan',
2310+
52660 => 'America/Mazatlan',
23102311
52661 => 'America/Tijuana',
23112312
52662 => 'America/Mazatlan',
23122313
52663 => 'America/Mexico_City',

tests/core/PhoneNumberUtilTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ public function testGetLengthOfGeographicalAreaCode()
333333
$this->assertEquals(1, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$auNumber));
334334

335335
// Italian numbers - there is no national prefix, but it still has an area code.
336+
$this->assertEquals(2, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$mxNumber1));
337+
338+
// Mexico numbers - there is no national prefix, but it still has an area code.
336339
$this->assertEquals(2, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$itNumber));
337340

338341
// Google Singapore. Singapore has no area code and no national prefix.

0 commit comments

Comments
 (0)