Skip to content

Commit

Permalink
Upstream metadata changes from Google for v8.13.32
Browse files Browse the repository at this point in the history
 - Updated phone metadata for region code(s): CN, GB, MC, US, XK
  • Loading branch information
giggsey committed Mar 12, 2024
1 parent 5cce4b5 commit 442794e
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 21 deletions.
2 changes: 1 addition & 1 deletion METADATA-VERSION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# It can be a commit, branch or tag of the https://github.com/google/libphonenumber project
#
# For more information, look at the phing tasks in build.xml
v8.13.31
v8.13.32
40 changes: 27 additions & 13 deletions src/data/PhoneNumberMetadata_CN.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,27 @@
'format' => '$1',
'leadingDigitsPatterns' =>
[
0 => '10|96',
0 => '1(?:00|2[13])|95',
1 => '1(?:00|2(?:11|39))|95',
2 => '1(?:00|2(?:110|395))|95',
],
'nationalPrefixFormattingRule' => '',
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
1 =>
[
'pattern' => '(\\d{5,6})',
'format' => '$1',
'leadingDigitsPatterns' =>
[
0 => '10|96',
],
'nationalPrefixFormattingRule' => '',
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
2 =>
[
'pattern' => '(\\d{2})(\\d{5,6})',
'format' => '$1 $2',
Expand All @@ -169,7 +183,7 @@
'domesticCarrierCodeFormattingRule' => '$CC $1',
'nationalPrefixOptionalWhenFormatting' => false,
],
2 =>
3 =>
[
'pattern' => '(\\d{3})(\\d{4})',
'format' => '$1 $2',
Expand All @@ -183,7 +197,7 @@
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
3 =>
4 =>
[
'pattern' => '(\\d{4})(\\d{4})',
'format' => '$1 $2',
Expand All @@ -195,7 +209,7 @@
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
4 =>
5 =>
[
'pattern' => '(\\d{3})(\\d{5,6})',
'format' => '$1 $2',
Expand All @@ -210,7 +224,7 @@
'domesticCarrierCodeFormattingRule' => '$CC $1',
'nationalPrefixOptionalWhenFormatting' => false,
],
5 =>
6 =>
[
'pattern' => '(\\d{4})(\\d{4})',
'format' => '$1 $2',
Expand All @@ -225,7 +239,7 @@
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
6 =>
7 =>
[
'pattern' => '(\\d{3})(\\d{3})(\\d{4})',
'format' => '$1 $2 $3',
Expand All @@ -237,7 +251,7 @@
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
7 =>
8 =>
[
'pattern' => '(\\d{2})(\\d{4})(\\d{4})',
'format' => '$1 $2 $3',
Expand All @@ -251,7 +265,7 @@
'domesticCarrierCodeFormattingRule' => '$CC $1',
'nationalPrefixOptionalWhenFormatting' => true,
],
8 =>
9 =>
[
'pattern' => '(\\d{3})(\\d{3})(\\d{4})',
'format' => '$1 $2 $3',
Expand All @@ -263,7 +277,7 @@
'domesticCarrierCodeFormattingRule' => '$CC $1',
'nationalPrefixOptionalWhenFormatting' => true,
],
9 =>
10 =>
[
'pattern' => '(\\d{3})(\\d{7,8})',
'format' => '$1 $2',
Expand All @@ -275,7 +289,7 @@
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
10 =>
11 =>
[
'pattern' => '(\\d{4})(\\d{3})(\\d{4})',
'format' => '$1 $2 $3',
Expand All @@ -287,7 +301,7 @@
'domesticCarrierCodeFormattingRule' => '$CC $1',
'nationalPrefixOptionalWhenFormatting' => true,
],
11 =>
12 =>
[
'pattern' => '(\\d{3})(\\d{4})(\\d{4})',
'format' => '$1 $2 $3',
Expand All @@ -299,7 +313,7 @@
'domesticCarrierCodeFormattingRule' => '$CC $1',
'nationalPrefixOptionalWhenFormatting' => true,
],
12 =>
13 =>
[
'pattern' => '(\\d{3})(\\d{4})(\\d{4})',
'format' => '$1 $2 $3',
Expand All @@ -311,7 +325,7 @@
'domesticCarrierCodeFormattingRule' => '$CC $1',
'nationalPrefixOptionalWhenFormatting' => false,
],
13 =>
14 =>
[
'pattern' => '(\\d{2})(\\d{3})(\\d{3})(\\d{4})',
'format' => '$1 $2 $3 $4',
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_GB.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
'fixedLine' =>
[
'NationalNumberPattern' => '(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}',
'NationalNumberPattern' => '(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}',
'ExampleNumber' => '1212345678',
'PossibleLength' =>
[
Expand Down
2 changes: 1 addition & 1 deletion src/data/PhoneNumberMetadata_MC.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '4(?:[46]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}',
'NationalNumberPattern' => '4(?:[469]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}',
'ExampleNumber' => '612345678',
],
'tollFree' =>
Expand Down
4 changes: 2 additions & 2 deletions src/data/PhoneNumberMetadata_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
'fixedLine' =>
[
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'ExampleNumber' => '2015550123',
'PossibleLengthLocalOnly' =>
[
Expand All @@ -30,7 +30,7 @@
],
'mobile' =>
[
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'NationalNumberPattern' => '(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}',
'ExampleNumber' => '2015550123',
'PossibleLengthLocalOnly' =>
[
Expand Down
21 changes: 18 additions & 3 deletions src/data/PhoneNumberMetadata_XK.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
return [
'generalDesc' =>
[
'NationalNumberPattern' => '[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}',
'NationalNumberPattern' => '2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}',
'PossibleLength' =>
[
0 => 8,
1 => 9,
2 => 10,
3 => 11,
4 => 12,
],
],
'fixedLine' =>
[
'NationalNumberPattern' => '(?:2[89]|39)0\\d{6}|[23][89]\\d{6}',
'NationalNumberPattern' => '38\\d{6,10}|(?:2[89]|39)(?:0\\d{5,6}|[1-9]\\d{5})',
'ExampleNumber' => '28012345',
],
'mobile' =>
Expand Down Expand Up @@ -135,7 +138,19 @@
'format' => '$1 $2 $3',
'leadingDigitsPatterns' =>
[
0 => '[23]',
0 => '2|39',
],
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
'nationalPrefixOptionalWhenFormatting' => false,
],
3 =>
[
'pattern' => '(\\d{2})(\\d{7,10})',
'format' => '$1 $2',
'leadingDigitsPatterns' =>
[
0 => '3',
],
'nationalPrefixFormattingRule' => '0$1',
'domesticCarrierCodeFormattingRule' => '',
Expand Down

0 comments on commit 442794e

Please sign in to comment.