aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-09-24 16:21:14 +1000
committerMatthew Landauer <matthew@openaustralia.org>2012-09-24 16:21:14 +1000
commita9e41c56e1a44b78a48a0febc2124c3edd0e4c7b (patch)
treeb5b739d51c6cd8666bd83e71e07141504276da5a
parent245e7b46180321cc9763dbf931266ff9cc1699b1 (diff)
Added a bit more of a comment to explain how the calendar days work
-rw-r--r--app/models/holiday.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/holiday.rb b/app/models/holiday.rb
index 1d70c12a3..efa516e1c 100644
--- a/app/models/holiday.rb
+++ b/app/models/holiday.rb
@@ -62,6 +62,8 @@ 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)
+ # If the due date falls on a weekend or a holiday then the due date is the next
+ # weekday that isn't a holiday.
def Holiday.due_date_from_calendar_days(start_date, days)
# convert date/times into dates
start_date = start_date.to_date