@@ -91,17 +91,17 @@ schedule.previous_occurrence(from_time)
91
91
schedule.previous_occurrences(4 , from_time)
92
92
93
93
# or include prior occurrences with a duration overlapping from_time
94
- schedule.next_occurrences(4 , from_time, : spans => true )
95
- schedule.occurrences_between(from_time, to_time, : spans => true )
94
+ schedule.next_occurrences(4 , from_time, spans: true )
95
+ schedule.occurrences_between(from_time, to_time, spans: true )
96
96
97
97
# or give the schedule a duration and ask if occurring_at?
98
- schedule = IceCube ::Schedule .new (now, : duration => 3600 )
98
+ schedule = IceCube ::Schedule .new (now, duration: 3600 )
99
99
schedule.add_recurrence_rule IceCube ::Rule .daily
100
100
schedule.occurring_at?(now + 1800 ) # true
101
101
schedule.occurring_between?(t1, t2)
102
102
103
103
# using end_time also sets the duration
104
- schedule = IceCube ::Schedule .new (start = Time .now, : end_time => start + 3600 )
104
+ schedule = IceCube ::Schedule .new (start = Time .now, end_time: start + 3600 )
105
105
schedule.add_recurrence_rule IceCube ::Rule .daily
106
106
schedule.occurring_at?(start + 3599 ) # true
107
107
schedule.occurring_at?(start + 3600 ) # false
@@ -162,7 +162,7 @@ ice_cube can provide ical or string representations of individual rules, or the
162
162
whole schedule.
163
163
164
164
``` ruby
165
- rule = IceCube ::Rule .daily(2 ).day_of_week(: tuesday => [1 , - 1 ], : wednesday => [2 ])
165
+ rule = IceCube ::Rule .daily(2 ).day_of_week(tuesday: [1 , - 1 ], wednesday: [2 ])
166
166
167
167
rule.to_ical # 'FREQ=DAILY;INTERVAL=2;BYDAY=1TU,-1TU,2WE'
168
168
@@ -218,12 +218,12 @@ month (e.g. no occurrences in February for `day_of_month(31)`).
218
218
219
219
``` ruby
220
220
# every month on the first and last tuesdays of the month
221
- schedule.add_recurrence_rule IceCube ::Rule .monthly.day_of_week(: tuesday => [1 , - 1 ])
221
+ schedule.add_recurrence_rule IceCube ::Rule .monthly.day_of_week(tuesday: [1 , - 1 ])
222
222
223
223
# every other month on the first monday and last tuesday
224
224
schedule.add_recurrence_rule IceCube ::Rule .monthly(2 ).day_of_week(
225
- : monday => [1 ],
226
- : tuesday => [- 1 ]
225
+ monday: [1 ],
226
+ tuesday: [- 1 ]
227
227
)
228
228
229
229
# for programmatic convenience (same as above)
@@ -270,7 +270,7 @@ schedule.add_recurrence_rule IceCube::Rule.hourly(2).day(:monday)
270
270
schedule.add_recurrence_rule IceCube ::Rule .minutely(10 )
271
271
272
272
# every hour and a half, on the last tuesday of the month
273
- schedule.add_recurrence_rule IceCube ::Rule .minutely(90 ).day_of_week(: tuesday => [- 1 ])
273
+ schedule.add_recurrence_rule IceCube ::Rule .minutely(90 ).day_of_week(tuesday: [- 1 ])
274
274
```
275
275
276
276
### Secondly (every N seconds)
0 commit comments