et-orbi 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/CREDITS.md +1 -0
- data/lib/et-orbi.rb +1 -1
- data/lib/et-orbi/time.rb +18 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3ad790bb200e2bb944f6d8b69abb66a3f5563c0d601fd51839c19fa9b2585ed
|
4
|
+
data.tar.gz: 1a9c61b4371a23fb0e4c4db5dfdf5ffb0fd440415f811e232a580e6ce71d37f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f6032e29f4f91a638c5d524cd94854128ad9f59d2a017989088dd44c130098bbce44460f0d57396e3dd81a155b770fdcc3454be8069513924aa1dfe1807ea0d
|
7
|
+
data.tar.gz: 2b9b2e1b4dd3c49c103d856509096ca0672c3efff4b9e3d5affb87559de010416c9944de55cd4284a8f3bc949ef2f6251fe0fd56c7a055aa516f63b046a09c28
|
data/CHANGELOG.md
CHANGED
data/CREDITS.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
2
|
# et-orbi credits
|
3
3
|
|
4
|
+
* d-m-u (https://github.com/d-m-u) EoTime#==(Time), gh-20, gh-7
|
4
5
|
* Vais Salikhov (https://github.com/vais) missing US timezone aliases, gh-18 gh-19
|
5
6
|
* Wenhui Wang https://github.com/w11th .parse vs Chronic+ActiveSupport, fugit 11
|
6
7
|
* Marcel https://github.com/MTRNord "Mitteleuropaeische Sommerzeit", gh-15
|
data/lib/et-orbi.rb
CHANGED
data/lib/et-orbi/time.rb
CHANGED
@@ -205,11 +205,24 @@ module EtOrbi
|
|
205
205
|
|
206
206
|
def ==(o)
|
207
207
|
|
208
|
-
o.is_a?(EoTime)
|
209
|
-
|
210
|
-
|
208
|
+
if o.is_a?(EoTime)
|
209
|
+
o.seconds == @seconds &&
|
210
|
+
(o.zone == @zone || o.zone.current_period == @zone.current_period)
|
211
|
+
elsif o.is_a?(::Time)
|
212
|
+
(to_f * 1000).to_i == (o.to_f * 1000).to_i
|
213
|
+
else
|
214
|
+
false
|
215
|
+
end
|
211
216
|
end
|
212
|
-
|
217
|
+
|
218
|
+
# Nota Bene:
|
219
|
+
#
|
220
|
+
# Unlike ==, the equal? method should never be overridden by subclasses
|
221
|
+
# as it is used to determine object identity (that is, a.equal?(b) if and
|
222
|
+
# only if a is the same object as b)
|
223
|
+
#
|
224
|
+
# The eql? method returns true if obj and other refer to the same hash key.
|
225
|
+
# This is used by Hash to test members for equality.
|
213
226
|
|
214
227
|
def >(o); @seconds > _to_f(o); end
|
215
228
|
def >=(o); @seconds >= _to_f(o); end
|
@@ -414,7 +427,7 @@ module EtOrbi
|
|
414
427
|
|
415
428
|
fail ArgumentError(
|
416
429
|
"Comparison of EoTime with #{o.inspect} failed"
|
417
|
-
) unless o.
|
430
|
+
) unless o.respond_to?(:to_f)
|
418
431
|
|
419
432
|
o.to_f
|
420
433
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: et-orbi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
|
-
rubygems_version: 2.6
|
101
|
+
rubygems_version: 2.7.6
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: time with zones
|