telephone_number 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -3
- data/README.md +6 -0
- data/data/geocoding/ar/82.txt +0 -0
- data/data/geocoding/ar/966.dat +0 -0
- data/data/geocoding/ar/966.txt +0 -5
- data/data/geocoding/be/375.txt +0 -0
- data/data/geocoding/bg/359.txt +0 -0
- data/data/geocoding/bg/82.txt +0 -0
- data/data/geocoding/bs/387.dat +0 -0
- data/data/geocoding/bs/387.txt +37 -0
- data/data/geocoding/ca/82.txt +0 -0
- data/data/geocoding/cs/82.txt +0 -0
- data/data/geocoding/de/32.txt +0 -0
- data/data/geocoding/de/352.txt +0 -0
- data/data/geocoding/de/41.txt +0 -0
- data/data/geocoding/de/43.txt +0 -0
- data/data/geocoding/de/49.txt +0 -0
- data/data/geocoding/el/30.txt +0 -0
- data/data/geocoding/el/82.txt +0 -0
- data/data/geocoding/en/1.txt +0 -0
- data/data/geocoding/en/20.txt +0 -0
- data/data/geocoding/en/212.txt +0 -0
- data/data/geocoding/en/213.txt +0 -0
- data/data/geocoding/en/216.txt +0 -0
- data/data/geocoding/en/218.txt +0 -0
- data/data/geocoding/en/220.txt +0 -0
- data/data/geocoding/en/221.txt +0 -0
- data/data/geocoding/en/222.txt +0 -0
- data/data/geocoding/en/223.txt +0 -0
- data/data/geocoding/en/224.txt +0 -0
- data/data/geocoding/en/225.txt +0 -0
- data/data/geocoding/en/226.txt +0 -0
- data/data/geocoding/en/227.txt +0 -0
- data/data/geocoding/en/228.txt +0 -0
- data/data/geocoding/en/229.txt +0 -0
- data/data/geocoding/en/230.txt +0 -0
- data/data/geocoding/en/232.txt +0 -0
- data/data/geocoding/en/233.txt +0 -0
- data/data/geocoding/en/234.txt +0 -0
- data/data/geocoding/en/237.txt +0 -0
- data/data/geocoding/en/238.txt +0 -0
- data/data/geocoding/en/239.txt +0 -0
- data/data/geocoding/en/240.txt +0 -0
- data/data/geocoding/en/241.txt +0 -0
- data/data/geocoding/en/242.txt +0 -0
- data/data/geocoding/en/243.txt +0 -0
- data/data/geocoding/en/244.txt +0 -0
- data/data/geocoding/en/245.txt +0 -0
- data/data/geocoding/en/247.txt +0 -0
- data/data/geocoding/en/249.txt +0 -0
- data/data/geocoding/en/251.txt +0 -0
- data/data/geocoding/en/252.txt +0 -0
- data/data/geocoding/en/254.txt +0 -0
- data/data/geocoding/en/255.txt +0 -0
- data/data/geocoding/en/256.txt +0 -0
- data/data/geocoding/en/257.txt +0 -0
- data/data/geocoding/en/258.txt +0 -0
- data/data/geocoding/en/260.txt +0 -0
- data/data/geocoding/en/261.txt +0 -0
- data/data/geocoding/en/263.dat +0 -0
- data/data/geocoding/en/263.txt +85 -35
- data/data/geocoding/en/264.txt +0 -0
- data/data/geocoding/en/266.txt +0 -0
- data/data/geocoding/en/267.txt +0 -0
- data/data/geocoding/en/268.txt +0 -0
- data/data/geocoding/en/269.txt +0 -0
- data/data/geocoding/en/27.txt +0 -0
- data/data/geocoding/en/290.txt +0 -0
- data/data/geocoding/en/299.txt +0 -0
- data/data/geocoding/en/30.txt +0 -0
- data/data/geocoding/en/31.dat +0 -0
- data/data/geocoding/en/31.txt +20 -0
- data/data/geocoding/en/32.txt +0 -0
- data/data/geocoding/en/33.txt +0 -0
- data/data/geocoding/en/34.txt +0 -0
- data/data/geocoding/en/351.txt +0 -0
- data/data/geocoding/en/352.txt +0 -0
- data/data/geocoding/en/353.txt +0 -0
- data/data/geocoding/en/354.txt +0 -0
- data/data/geocoding/en/355.txt +0 -0
- data/data/geocoding/en/358.txt +0 -0
- data/data/geocoding/en/359.txt +0 -0
- data/data/geocoding/en/36.txt +0 -0
- data/data/geocoding/en/370.txt +0 -0
- data/data/geocoding/en/371.txt +0 -0
- data/data/geocoding/en/372.txt +0 -0
- data/data/geocoding/en/373.txt +0 -0
- data/data/geocoding/en/374.txt +0 -0
- data/data/geocoding/en/375.txt +0 -0
- data/data/geocoding/en/380.txt +0 -0
- data/data/geocoding/en/381.txt +0 -0
- data/data/geocoding/en/383.dat +0 -0
- data/data/geocoding/en/383.txt +23 -0
- data/data/geocoding/en/387.dat +0 -0
- data/data/geocoding/en/387.txt +38 -0
- data/data/geocoding/en/389.txt +0 -0
- data/data/geocoding/en/39.txt +0 -0
- data/data/geocoding/en/40.txt +0 -0
- data/data/geocoding/en/41.txt +0 -0
- data/data/geocoding/en/420.txt +0 -0
- data/data/geocoding/en/421.txt +0 -0
- data/data/geocoding/en/43.txt +0 -0
- data/data/geocoding/en/44.txt +0 -0
- data/data/geocoding/en/46.txt +0 -0
- data/data/geocoding/en/47.txt +0 -0
- data/data/geocoding/en/48.txt +0 -0
- data/data/geocoding/en/49.txt +0 -0
- data/data/geocoding/en/501.txt +0 -0
- data/data/geocoding/en/504.txt +0 -0
- data/data/geocoding/en/51.txt +0 -0
- data/data/geocoding/en/52.txt +0 -0
- data/data/geocoding/en/53.txt +0 -0
- data/data/geocoding/en/54.txt +0 -0
- data/data/geocoding/en/55.txt +0 -0
- data/data/geocoding/en/56.txt +0 -0
- data/data/geocoding/en/57.txt +0 -0
- data/data/geocoding/en/58.txt +0 -0
- data/data/geocoding/en/592.txt +0 -0
- data/data/geocoding/en/599.txt +0 -0
- data/data/geocoding/en/61.dat +0 -0
- data/data/geocoding/en/61.txt +46 -0
- data/data/geocoding/en/62.txt +0 -0
- data/data/geocoding/en/64.txt +0 -0
- data/data/geocoding/en/66.txt +0 -0
- data/data/geocoding/en/675.txt +0 -0
- data/data/geocoding/en/680.dat +0 -0
- data/data/geocoding/en/680.txt +31 -0
- data/data/geocoding/en/686.txt +0 -0
- data/data/geocoding/en/688.txt +0 -0
- data/data/geocoding/en/7.txt +0 -0
- data/data/geocoding/en/81.txt +0 -0
- data/data/geocoding/en/82.txt +0 -0
- data/data/geocoding/en/84.txt +0 -0
- data/data/geocoding/en/86.txt +0 -0
- data/data/geocoding/en/886.txt +0 -0
- data/data/geocoding/en/90.txt +0 -0
- data/data/geocoding/en/91.txt +0 -0
- data/data/geocoding/en/93.txt +0 -0
- data/data/geocoding/en/94.txt +0 -0
- data/data/geocoding/en/95.txt +0 -0
- data/data/geocoding/en/960.txt +0 -0
- data/data/geocoding/en/962.txt +0 -0
- data/data/geocoding/en/966.dat +0 -0
- data/data/geocoding/en/966.txt +0 -5
- data/data/geocoding/en/968.txt +0 -0
- data/data/geocoding/en/972.txt +0 -0
- data/data/geocoding/en/975.txt +0 -0
- data/data/geocoding/en/976.txt +0 -0
- data/data/geocoding/en/98.txt +0 -0
- data/data/geocoding/en/992.txt +0 -0
- data/data/geocoding/en/994.txt +0 -0
- data/data/geocoding/es/228.txt +0 -0
- data/data/geocoding/es/230.txt +0 -0
- data/data/geocoding/es/34.txt +0 -0
- data/data/geocoding/es/52.txt +0 -0
- data/data/geocoding/es/54.txt +0 -0
- data/data/geocoding/es/56.txt +0 -0
- data/data/geocoding/es/57.txt +0 -0
- data/data/geocoding/es/58.txt +0 -0
- data/data/geocoding/es/82.txt +0 -0
- data/data/geocoding/fa/93.txt +0 -0
- data/data/geocoding/fa/98.txt +0 -0
- data/data/geocoding/fi/358.txt +0 -0
- data/data/geocoding/fi/82.txt +0 -0
- data/data/geocoding/fr/212.txt +0 -0
- data/data/geocoding/fr/222.txt +0 -0
- data/data/geocoding/fr/225.txt +0 -0
- data/data/geocoding/fr/228.txt +0 -0
- data/data/geocoding/fr/229.txt +0 -0
- data/data/geocoding/fr/230.txt +0 -0
- data/data/geocoding/fr/242.txt +0 -0
- data/data/geocoding/fr/243.txt +0 -0
- data/data/geocoding/fr/269.txt +0 -0
- data/data/geocoding/fr/290.txt +0 -0
- data/data/geocoding/fr/32.txt +0 -0
- data/data/geocoding/fr/33.txt +0 -0
- data/data/geocoding/fr/352.txt +0 -0
- data/data/geocoding/fr/41.txt +0 -0
- data/data/geocoding/fr/82.txt +0 -0
- data/data/geocoding/hi/82.txt +0 -0
- data/data/geocoding/hr/387.dat +0 -0
- data/data/geocoding/hr/387.txt +30 -0
- data/data/geocoding/hu/36.txt +0 -0
- data/data/geocoding/hu/82.txt +0 -0
- data/data/geocoding/hy/374.txt +0 -0
- data/data/geocoding/id/62.txt +0 -0
- data/data/geocoding/it/39.txt +0 -0
- data/data/geocoding/it/41.txt +0 -0
- data/data/geocoding/iw/82.txt +0 -0
- data/data/geocoding/iw/972.txt +0 -0
- data/data/geocoding/ja/81.txt +0 -0
- data/data/geocoding/ja/82.txt +0 -0
- data/data/geocoding/ko/82.txt +0 -0
- data/data/geocoding/nl/31.dat +0 -0
- data/data/geocoding/nl/31.txt +13 -0
- data/data/geocoding/nl/32.txt +0 -0
- data/data/geocoding/pl/48.txt +0 -0
- data/data/geocoding/pl/82.txt +0 -0
- data/data/geocoding/pt/238.txt +0 -0
- data/data/geocoding/pt/239.txt +0 -0
- data/data/geocoding/pt/244.txt +0 -0
- data/data/geocoding/pt/245.txt +0 -0
- data/data/geocoding/pt/258.txt +0 -0
- data/data/geocoding/pt/351.txt +0 -0
- data/data/geocoding/pt/55.txt +0 -0
- data/data/geocoding/pt/82.txt +0 -0
- data/data/geocoding/ro/373.txt +0 -0
- data/data/geocoding/ro/40.txt +0 -0
- data/data/geocoding/ro/82.txt +0 -0
- data/data/geocoding/ru/373.txt +0 -0
- data/data/geocoding/ru/374.txt +0 -0
- data/data/geocoding/ru/375.txt +0 -0
- data/data/geocoding/ru/7.txt +0 -0
- data/data/geocoding/ru/82.txt +0 -0
- data/data/geocoding/sl/82.txt +0 -0
- data/data/geocoding/sq/383.dat +0 -0
- data/data/geocoding/sq/383.txt +23 -0
- data/data/geocoding/sr/381.dat +0 -0
- data/data/geocoding/sr/381.txt +34 -34
- data/data/geocoding/sr/383.dat +0 -0
- data/data/geocoding/sr/383.txt +23 -0
- data/data/geocoding/sr/387.dat +0 -0
- data/data/geocoding/sr/387.txt +37 -0
- data/data/geocoding/sr/82.txt +0 -0
- data/data/geocoding/sv/358.txt +0 -0
- data/data/geocoding/sv/46.txt +0 -0
- data/data/geocoding/th/66.txt +0 -0
- data/data/geocoding/tr/82.txt +0 -0
- data/data/geocoding/tr/90.txt +0 -0
- data/data/geocoding/uk/82.txt +0 -0
- data/data/geocoding/vi/82.txt +0 -0
- data/data/geocoding/vi/84.txt +0 -0
- data/data/geocoding/zh/82.txt +0 -0
- data/data/geocoding/zh/86.txt +0 -0
- data/data/geocoding/zh/886.txt +0 -0
- data/data/geocoding/zh_Hant/82.txt +0 -0
- data/data/geocoding/zh_Hant/886.txt +0 -0
- data/data/telephone_number_data_file.dat +0 -0
- data/data/telephone_number_data_file.xml +915 -709
- data/data/timezones/README.md +55 -0
- data/data/timezones/map_data.txt +0 -0
- data/lib/telephone_number/version.rb +1 -1
- metadata +19 -2
@@ -0,0 +1,55 @@
|
|
1
|
+
# Timezone Mapper
|
2
|
+
|
3
|
+
The timezone mapper allows a likely timezone to be obtained for a given phone
|
4
|
+
number. The timezone returned is the canonical ID from [CLDR](
|
5
|
+
http://www.unicode.org/cldr/charts/latest/supplemental/zone_tzid.html), not a
|
6
|
+
localised name (or any other identifier). For mobile phones which are associated
|
7
|
+
with particular area codes, it returns the timezone of the area code; it does
|
8
|
+
not track the user's current location in any way. This could be used to work out
|
9
|
+
whether it is likely to be a good time to ring a user based on their provided
|
10
|
+
number.
|
11
|
+
|
12
|
+
Code Location:
|
13
|
+
[java/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java](https://github.com/googlei18n/libphonenumber/blob/master/java/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java)
|
14
|
+
|
15
|
+
Example usage:
|
16
|
+
|
17
|
+
```
|
18
|
+
PhoneNumberToTimeZonesMapper timeZonesMapper = PhoneNumberToTimeZonesMapper.getInstance();
|
19
|
+
|
20
|
+
List<String> timezones = timeZonesMapper.getTimeZonesForNumber(phoneNumber);
|
21
|
+
```
|
22
|
+
|
23
|
+
## Contributing to the timezone metadata
|
24
|
+
|
25
|
+
The timezone metadata is auto-generated with few exceptions, so we cannot accept
|
26
|
+
pull requests. If we have an error please file an issue and we'll see if we can
|
27
|
+
make a generic fix.
|
28
|
+
|
29
|
+
If making fixes in your own fork while you wait for this, build the metadata by
|
30
|
+
running this command from the root of the repository (assuming you have `ant`
|
31
|
+
installed):
|
32
|
+
|
33
|
+
```
|
34
|
+
ant -f java/build.xml build-timezones-data
|
35
|
+
```
|
36
|
+
|
37
|
+
Note that, due to our using stable CLDR timezone IDs, we do not change the ID
|
38
|
+
for an existing timezone when the name of a region or subdivision changes. The
|
39
|
+
library returns the *ID*, which you may use to get the localised name from CLDR.
|
40
|
+
|
41
|
+
See CLDR's [documentation for timezone
|
42
|
+
translations](http://cldr.unicode.org/translation/timezones). You can also
|
43
|
+
browse [different languages'
|
44
|
+
names](http://www.unicode.org/cldr/charts/latest/verify/zones/index.html); for
|
45
|
+
example, the `Asia/Calcutta` timezone identifier has English names
|
46
|
+
`Kolkata Time` and `India Standard Time`, and the [English
|
47
|
+
file](http://www.unicode.org/cldr/charts/latest/verify/zones/en.html) links to
|
48
|
+
a [view](http://st.unicode.org/cldr-apps/v#/en/SAsia/2dac3ef061238996) with
|
49
|
+
other regions having the same timezone (including those with different IDs).
|
50
|
+
|
51
|
+
Other relevant CLDR data:
|
52
|
+
* http://www.unicode.org/cldr/charts/latest/supplemental/zone_tzid.html
|
53
|
+
* http://unicode.org/repos/cldr/trunk/common/bcp47/timezone.xml
|
54
|
+
* http://unicode.org/repos/cldr/trunk/common/supplemental/metaZones.xml
|
55
|
+
* http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
|
data/data/timezones/map_data.txt
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telephone_number
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MOBI Wireless Management
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -167,6 +167,8 @@ files:
|
|
167
167
|
- data/geocoding/bg/359.txt
|
168
168
|
- data/geocoding/bg/82.dat
|
169
169
|
- data/geocoding/bg/82.txt
|
170
|
+
- data/geocoding/bs/387.dat
|
171
|
+
- data/geocoding/bs/387.txt
|
170
172
|
- data/geocoding/ca/82.dat
|
171
173
|
- data/geocoding/ca/82.txt
|
172
174
|
- data/geocoding/cs/82.dat
|
@@ -325,6 +327,10 @@ files:
|
|
325
327
|
- data/geocoding/en/380.txt
|
326
328
|
- data/geocoding/en/381.dat
|
327
329
|
- data/geocoding/en/381.txt
|
330
|
+
- data/geocoding/en/383.dat
|
331
|
+
- data/geocoding/en/383.txt
|
332
|
+
- data/geocoding/en/387.dat
|
333
|
+
- data/geocoding/en/387.txt
|
328
334
|
- data/geocoding/en/389.dat
|
329
335
|
- data/geocoding/en/389.txt
|
330
336
|
- data/geocoding/en/39.dat
|
@@ -383,6 +389,8 @@ files:
|
|
383
389
|
- data/geocoding/en/66.txt
|
384
390
|
- data/geocoding/en/675.dat
|
385
391
|
- data/geocoding/en/675.txt
|
392
|
+
- data/geocoding/en/680.dat
|
393
|
+
- data/geocoding/en/680.txt
|
386
394
|
- data/geocoding/en/686.dat
|
387
395
|
- data/geocoding/en/686.txt
|
388
396
|
- data/geocoding/en/688.dat
|
@@ -487,6 +495,8 @@ files:
|
|
487
495
|
- data/geocoding/fr/82.txt
|
488
496
|
- data/geocoding/hi/82.dat
|
489
497
|
- data/geocoding/hi/82.txt
|
498
|
+
- data/geocoding/hr/387.dat
|
499
|
+
- data/geocoding/hr/387.txt
|
490
500
|
- data/geocoding/hu/36.dat
|
491
501
|
- data/geocoding/hu/36.txt
|
492
502
|
- data/geocoding/hu/82.dat
|
@@ -551,8 +561,14 @@ files:
|
|
551
561
|
- data/geocoding/ru/82.txt
|
552
562
|
- data/geocoding/sl/82.dat
|
553
563
|
- data/geocoding/sl/82.txt
|
564
|
+
- data/geocoding/sq/383.dat
|
565
|
+
- data/geocoding/sq/383.txt
|
554
566
|
- data/geocoding/sr/381.dat
|
555
567
|
- data/geocoding/sr/381.txt
|
568
|
+
- data/geocoding/sr/383.dat
|
569
|
+
- data/geocoding/sr/383.txt
|
570
|
+
- data/geocoding/sr/387.dat
|
571
|
+
- data/geocoding/sr/387.txt
|
556
572
|
- data/geocoding/sr/82.dat
|
557
573
|
- data/geocoding/sr/82.txt
|
558
574
|
- data/geocoding/sv/358.dat
|
@@ -583,6 +599,7 @@ files:
|
|
583
599
|
- data/geocoding/zh_Hant/886.txt
|
584
600
|
- data/telephone_number_data_file.dat
|
585
601
|
- data/telephone_number_data_file.xml
|
602
|
+
- data/timezones/README.md
|
586
603
|
- data/timezones/map_data.dat
|
587
604
|
- data/timezones/map_data.txt
|
588
605
|
- lib/active_model/telephone_number_validator.rb
|