diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-09-24 16:06:26 +1000 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-09-24 16:06:26 +1000 |
commit | 00e9b2ed77a55f90e12b0cc278c5723d9bc7dac0 (patch) | |
tree | d8cac6f1029cba1af94030b802366c3fbf6591f5 /app | |
parent | 42998406cd909332382d80af3c7c4a9d58ffbe23 (diff) |
Handle times passed to Holiday.due_date_from_calendar_days
Diffstat (limited to 'app')
-rw-r--r-- | app/models/holiday.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/holiday.rb b/app/models/holiday.rb index f07e3b05e..490fdb8c7 100644 --- a/app/models/holiday.rb +++ b/app/models/holiday.rb @@ -62,6 +62,9 @@ class Holiday < ActiveRecord::Base # Calculate the date on which a request made on a given date falls due when # the days are given in calendar days (rather than working days) def Holiday.due_date_from_calendar_days(start_date, days) + # convert date/times into dates + start_date = start_date.to_date + response_required_by = start_date + days while weekend_or_holiday?(response_required_by) response_required_by += 1 |