Module: TimeCrisis::Support::Advance::Date
- Defined in:
- lib/time_crisis/support/advance.rb
Instance Method Summary collapse
Instance Method Details
#advance(options) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/time_crisis/support/advance.rb', line 3 def advance() = .dup d = self d = d >> .delete(:years) * 12 if [:years] d = d >> .delete(:months) if [:months] d = d + .delete(:weeks) * 7 if [:weeks] d = d + .delete(:days) if [:days] d end |