us_time_zones 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -5
- data/lib/us_time_zones/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3212298e06bb0480267ce20a28f9bb56a6b8814
|
4
|
+
data.tar.gz: 3a7aaac74d062e6fa4f8970bf649f1c9ec5ba63f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51ee89385189b71d9f5d5b0abc1d794267e62a60da116cd6a022401eac895883b13274391de772926674ed54c0b963f88ba95eec79155816b5da1fb09173c822
|
7
|
+
data.tar.gz: 1786c7ee24c5d682f49740dd28a18539ddd568f7e99b0404fdbd5a21ce5061917727e33b57b591097c0e1615e9053f380ef948fad4c0689f73c9f2ea55c4b566
|
data/README.md
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
# UsTimeZones
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem takes in a set of coordinates and returns a US time zone as long as the input coordinates are in the US. The gem should therefore be used in conjunction with other time zone APIs to ensure international coverage. The US’s time zone boundaries are surprisingly unusual, and the Google Maps time zone API, as well as other APIs I have tested, do not perfectly account for some of the more esoteric boundaries.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Add this line to your application's Gemfile:
|
10
8
|
|
11
9
|
```ruby
|
12
|
-
gem 'us_time_zones'
|
10
|
+
gem 'us_time_zones', '~> 2.0.9'
|
13
11
|
```
|
14
12
|
|
15
13
|
And then execute:
|
@@ -22,7 +20,16 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
TZ.whichTZ?([LAT, LNG]) #==> returns US TIME ZONE
|
24
|
+
|
25
|
+
Example:
|
26
|
+
TZ.whichTZ?([33, -84]) #==> returns “US Eastern Time Zone”
|
27
|
+
|
28
|
+
If outside the US:
|
29
|
+
==> returns "Unable to determine time zone for coordinates outside the US"
|
30
|
+
OR
|
31
|
+
==> returns “Error”
|
32
|
+
|
26
33
|
|
27
34
|
## Development
|
28
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: us_time_zones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dixon Adair
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|