on_calendar 0.1.3 → 0.1.4
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 +4 -4
- data/lib/on_calendar/parser.rb +3 -2
- data/lib/on_calendar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b3572ea68f262a1626b3185b2d13e79256725fd91c4fa5cdc889009fe1d7600
|
|
4
|
+
data.tar.gz: e618f9e40bb5fadfbbe22df8a402579d22770847f276a5a962157e1ecbb67d9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e80eb72a14466acf35cb779b8914827ef09d72e606beb163123feee839c1adb1ceb6ee9486bce358812f4c68a5c79a13a9e41d54bd412d986f5a6cf4726cdd6
|
|
7
|
+
data.tar.gz: 3dbb548925ef72560b394a5fb1379442a42b5363acec0fcea5bf032fe4e6451baa2e2b3914e99a2775daf31b8125dcb4e6dc59f3516433a2dc224ec4de231fca
|
data/lib/on_calendar/parser.rb
CHANGED
|
@@ -31,8 +31,9 @@ module OnCalendar
|
|
|
31
31
|
def next(count=1, clamp: timezone.now)
|
|
32
32
|
raise OnCalendar::Parser::Error, "Clamp must be instance of Time" unless clamp.is_a?(Time)
|
|
33
33
|
|
|
34
|
-
# Translate to correct timezone
|
|
35
|
-
|
|
34
|
+
# Translate to correct timezone and add 1.second to ensure
|
|
35
|
+
# we get the "next" occurence and not the current Time.now
|
|
36
|
+
clamp = clamp.in_time_zone(timezone) + 1.second
|
|
36
37
|
|
|
37
38
|
results = []
|
|
38
39
|
count.times do
|
data/lib/on_calendar/version.rb
CHANGED