Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/concerns/time_frame_filter.rb')
-rw-r--r--app/finders/concerns/time_frame_filter.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/finders/concerns/time_frame_filter.rb b/app/finders/concerns/time_frame_filter.rb
index e0baba25b64..d1ebed730f6 100644
--- a/app/finders/concerns/time_frame_filter.rb
+++ b/app/finders/concerns/time_frame_filter.rb
@@ -11,4 +11,11 @@ module TimeFrameFilter
rescue ArgumentError
items
end
+
+ def containing_date(items)
+ return items unless params[:containing_date]
+
+ date = params[:containing_date].to_date
+ items.within_timeframe(date, date)
+ end
end