From 6f1d827096ad9f1044a6da7141e7ae720a64ec6b Mon Sep 17 00:00:00 2001 From: gbuesing Date: Sun, 29 Jun 2008 15:26:56 -0500 Subject: TimeWithZone#advance: treat :weeks option as variable-length --- activesupport/lib/active_support/time_with_zone.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 7370a45931..88593eb92d 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -198,9 +198,9 @@ module ActiveSupport 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) -- cgit v1.2.3