When comparing dates, the time value needs to be modified to include any DateTimes spanning the 24 hour covered by that date value. Set date to end_of_day for lteq comparisons, and to beginning_of_day for gteq values:
# Override ActionSet filter_instructions_for method to modify filtering behavior.
def filter_instructions_for(set)
filter_params_hash = super
# Modify dates passed to lteq and gteq matchers so that their time portion is set correctly
filter_params_hash.select { |_, v| v.instance_of?(ActiveSupport::TimeWithZone) }.each do |k, v|
filter_params_hash[k] = v.end_of_day if k.first.include? 'lteq'
filter_params_hash[k] = v.beginning_of_day if k.first.include? 'gteq'
end
filter_params_hash
end
When comparing dates, the time value needs to be modified to include any DateTimes spanning the 24 hour covered by that date value. Set date to
end_of_dayforlteqcomparisons, and tobeginning_of_dayforgteqvalues: