This project is archived and is in readonly mode.
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
-
Jack Danger June 3rd, 2008 @ 08:06 PM
I got burned by this last week as well :-/
It got fixed just now: http://github.com/rails/rails/co...
-
Carlos Brando June 3rd, 2008 @ 12:17 PM
Careful. Because only has a fix to class Date. But forgotten class Time.
-
Carlos Brando June 3rd, 2008 @ 08:06 PM
You fix only class Date. But not class Time. It have a bug too.
On Tue, Jun 3, 2008 at 3:18 AM, Lighthouse
wrote:
-
josh September 18th, 2008 @ 10:38 PM
- Assigned user set to josh
- State changed from new to open
- Tag cleared.
- Milestone cleared.
-
Repository September 19th, 2008 @ 03:07 PM
- State changed from open to resolved
(from [79f55de9c5e3ff1f8d9e767c5af21ba31be4cfba]) Fixed Time#end_of_quarter to not blow up on May 31st [#313 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
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>
People watching this ticket
Attachments
Referenced by
- 313 Fixed Time#end_of_quarter. Returning the wrong time in some cases. (from [79f55de9c5e3ff1f8d9e767c5af21ba31be4cfba]) Fixed T...