Method: Workpattern::Day#calc
- Defined in:
- lib/workpattern/day.rb
#calc(a_date, a_duration) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/workpattern/day.rb', line 39 def calc(a_date, a_duration) if a_duration == 0 return a_date, a_duration, SAME_DAY else return a_duration > 0 ? add(a_date, a_duration) : subtract(a_date, a_duration) end end |