You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Similarly, I would expectDuration.new(:days=>2) + Time.now === Time.now.advance(:days=>2)# Currently this is instead:Duration.new(:days=>2) + Time.now# => seconds since 1970 + 2 days (as `Duration`)# While this is one possible interpretation It's fairy non-sensical, # i.e. it's not very useful, while a result that returned a new time instance # would make durations much more useable!
The text was updated successfully, but these errors were encountered:
Would be great if one could add a duration to time, yielding a new time instance.
Time.now + Duration.new(:days => 1) #=> time_at_one_day_from_now
Ruby's coerce should also be helpful here, so that the ordering doesn't matter:
The text was updated successfully, but these errors were encountered: