Commit 7adfdd774ec21b2555d403f1bbba895ddf97f6e5
1 parent
080fab87
Exists in
master
and in
4 other branches
Fixed current: false
Showing
2 changed files
with
12 additions
and
2 deletions
Show diff stats
CHANGELOG.md
lib/groupdate/magic.rb
... | ... | @@ -189,13 +189,18 @@ module Groupdate |
189 | 189 | end |
190 | 190 | if step |
191 | 191 | now = Time.now |
192 | - now -= step if options[:current] == false | |
193 | 192 | # loop instead of multiply to change start_at - see #151 |
194 | 193 | start_at = now |
195 | 194 | (options[:last].to_i - 1).times do |
196 | 195 | start_at -= step |
197 | 196 | end |
198 | - time_range = round_time(start_at)..now | |
197 | + | |
198 | + time_range = | |
199 | + if options[:current] == false | |
200 | + round_time(start_at - step)...round_time(now) | |
201 | + else | |
202 | + round_time(start_at)..now | |
203 | + end | |
199 | 204 | end |
200 | 205 | end |
201 | 206 | time_range | ... | ... |