This project is archived and is in readonly mode.

#313 ✓resolved
Carlos Brando

Fixed Time#end_of_quarter. Returning the wrong time in some cases.

Reported by Carlos Brando | June 3rd, 2008 @ 06:47 AM

The implementation of the method end_of_quarter was made of the wrong way, it moves until the last month of the quarter and then picks last day. The problem is that it only moves the month, but as the date is starting on May 31, it’s trying to create a new instance of the Date to June 31, which does not exist.

The class Time not raise an exception, but returns the wrong date: July 31.

This patch only fix Time class.

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>

Attachments

Referenced by

Pages