Time.next_week bug?

i ran into an error today when dealing with the method next_week and
daylight savings time…

Time.local( 2006,10,23 ).next_week
=> Tue Oct 24 00:00:00 EDT 2006

Any one know if this is a know issue or should a ticket be created for
this
issue?

thanks for the help

mark

On Jul 5, 2006, at 6:37 PM, Mark Van H. wrote:

mark


Mark Van H.
[email protected]
http://lotswholetime.com

Since I dealt with this very issue in Perl a few months ago, I had to
submit a patch and a ticket (http://dev.rubyonrails.org/ticket/5617)

It is good enough for your issue (and all my original Perl test cases
which was dealing with +/- N days rather than seconds):

Time.local( 2006,10,23 ).next_week
=> Mon Oct 30 00:00:00 EST 2006

Time.local( 2006,10,23 ).ago(1.day)
=> Sun Oct 22 00:00:00 EDT 2006

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs