This project is archived and is in readonly mode.

#970 ✓resolved
Tom Lea

1.5.days.ago != 36.hours.ago

Reported by Tom Lea | September 4th, 2008 @ 05:53 PM

1.5.days.ago != 36.hours.ago in 2.1... this worked in 1.2.3, and was a little surprising when migrating an exiting site.

I've attached a patch to fix this, by waterfalling the fractional weeks and days down to hours.

This does not change the way months and years behave, but it may be worth looking a being a little more grumpy about calling .years or .months on a float... but I digress...

Patch attached, as always, feedback/comments/+1s all welcome.

Comments and changes to this ticket

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages