Permalink
Browse files

TimeWithZone#advance: treat :weeks option as variable-length

  • Loading branch information...
1 parent 676d6a6 commit 6f1d827096ad9f1044a6da7141e7ae720a64ec6b @gbuesing gbuesing committed Jun 29, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/time_with_zone.rb
@@ -198,9 +198,9 @@ def ago(other)
end
def advance(options)
- # If we're advancing a value of variable length (i.e., years, months, days), advance from #time,
+ # If we're advancing a value of variable length (i.e., years, weeks, months, days), advance from #time,
# otherwise advance from #utc, for accuracy when moving across DST boundaries
- if options.detect {|k,v| [:years, :months, :days].include? k}
+ if options.detect {|k,v| [:years, :weeks, :months, :days].include? k}
method_missing(:advance, options)
else
utc.advance(options).in_time_zone(time_zone)

0 comments on commit 6f1d827

Please sign in to comment.