Method: Time#plus_day

Defined in:
lib/vpim/time.rb

#plus_day(days) ⇒ Object

Returns a new Time, days later than this time. Does this do as I expect over DST? What if the hour doesn’t exist in the next day, due to DST changes?



35
36
37
38
39
# File 'lib/vpim/time.rb', line 35

def plus_day(days)
  d = Date.new(year, month, day)
  d += days
  Time.local(d.year, d.month, d.day, hour, min, sec, usec)
end