This project is archived and is in readonly mode.

#1509 ✓invalid

.days == .seconds bug

Reported by PommyTom | December 3rd, 2008 @ 12:56 AM | in 2.x


Running on Rails 2.2.2 and get the following while in console:

Loading development environment (Rails 2.2.2)

5.years.days => 157788000.0 days 5.years.seconds => 157788000.0 seconds


Comments and changes to this ticket

  • Geoff Buesing

    Geoff Buesing December 3rd, 2008 @ 02:29 PM

    • State changed from “new” to “invalid”

    Well, you're doing something strange by calling #days and #seconds on an existing Duration object -- you're creating a new Duration based on the number of seconds in 5 years. I don't know of any reason why you'd want to do that, but this is the expected result.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket