@@ -26,7 +26,7 @@ def interval_bounds(interval_type, step_time, week_start: nil)
2626 start_day_of_week = TimeUtil . sym_to_wday ( week_start )
2727 step_time_day_of_week = step_time_date . wday
2828 days_delta = step_time_day_of_week - start_day_of_week
29- days_to_start = days_delta >= 0 ? days_delta : 7 + days_delta
29+ days_to_start = ( days_delta >= 0 ) ? days_delta : 7 + days_delta
3030 start_of_week_date = step_time_date - days_to_start
3131 end_of_week_date = start_of_week_date + 6
3232 [
@@ -69,9 +69,9 @@ def interval_bounds(interval_type, step_time, week_start: nil)
6969 def build_filtered_schedule ( rule , start_time , interval_start )
7070 # Strip BYSETPOS/COUNT/UNTIL so the candidate set is complete, and avoid
7171 # recursive BYSETPOS evaluation when we rebuild the temporary rule.
72- filtered_hash = rule . to_hash . reject { | key , _ | [ :by_set_pos , :count , :until ] . include? ( key ) }
72+ filtered_hash = rule . to_hash . except ( :by_set_pos , :count , :until )
7373 if filtered_hash [ :validations ]
74- filtered_hash [ :validations ] = filtered_hash [ :validations ] . reject { | key , _ | key == :by_set_pos }
74+ filtered_hash [ :validations ] = filtered_hash [ :validations ] . except ( :by_set_pos )
7575 filtered_hash . delete ( :validations ) if filtered_hash [ :validations ] . empty?
7676 end
7777
@@ -81,11 +81,11 @@ def build_filtered_schedule(rule, start_time, interval_start)
8181 # We must anchor the temp schedule to the interval boundary for expanded units,
8282 # while preserving DTSTART's value for implicit (non-expanded) units.
8383 v = rule . validations
84- expands_day = v [ :day ] || v [ :day_of_month ] || v [ :day_of_week ] || v [ :day_of_year ]
84+ expands_day = v [ :day ] || v [ :day_of_month ] || v [ :day_of_week ] || v [ :day_of_year ]
8585 expands_month = v [ :month_of_year ]
86- expands_hour = v [ :hour_of_day ]
87- expands_min = v [ :minute_of_hour ]
88- expands_sec = v [ :second_of_minute ]
86+ expands_hour = v [ :hour_of_day ]
87+ expands_min = v [ :minute_of_hour ]
88+ expands_sec = v [ :second_of_minute ]
8989
9090 # Anchor date: determine based on which date components are expanded.
9191 # WeeklyRule is special: "day" expansion means weekdays within the week.
@@ -115,8 +115,8 @@ def build_filtered_schedule(rule, start_time, interval_start)
115115 # This ensures the candidate set starts at the interval boundary for expanded
116116 # units while preserving implicit time-of-day anchors from DTSTART.
117117 hour = expands_hour ? interval_start . hour : start_time . hour
118- min = expands_min ? interval_start . min : start_time . min
119- sec = expands_sec ? interval_start . sec : start_time . sec
118+ min = expands_min ? interval_start . min : start_time . min
119+ sec = expands_sec ? interval_start . sec : start_time . sec
120120
121121 # Preserve sub-second precision from DTSTART to ensure occurrences.index(step_time)
122122 # can find exact matches when DTSTART has fractional seconds.
0 commit comments