Padded arrival and departure with one extra day

This commit is contained in:
Godwin
2016-08-09 22:07:21 -07:00
parent 8ffb852b4d
commit 81f5c21f43
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -754,6 +754,8 @@ module ApplicationHelper
belongs_to_periods = []
belongs_to_periods << :before if day <= conference.start_date
belongs_to_periods << :after if day >= conference.end_date
belongs_to_periods << :before_plus_one if day <= (conference.start_date + 1.day)
belongs_to_periods << :after_minus_one if day >= (conference.end_date - 1.day)
belongs_to_periods << :during if day >= conference.start_date && day <= conference.end_date
days << [date(day.to_date, format || :span_same_year_date_1), day] if belongs_to_periods.include?(period)
end