Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#313

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.

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

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. Jack Danger
    Jack Danger

    I got burned by this last week as well :-/

    It got fixed just now: http://github.com/rails/rails/co...

    June 3rd, 2008 @ 08:06 PM

  2. Carlos Brando
    Carlos Brando

    Careful. Because only has a fix to class Date. But forgotten class Time.

    June 3rd, 2008 @ 12:17 PM

  3. Carlos Brando
    Carlos Brando

    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:

    June 3rd, 2008 @ 08:06 PM

  4. josh
    josh
    • Assigned user set to josh
    • State changed from new to open
    • Tag cleared.
    • Milestone cleared.

    September 18th, 2008 @ 10:38 PM

  5. Repository
    Repository
    • State changed from open to resolved

    (from [79f55de9c5e3ff1f8d9e767c5af21ba31be4cfba]) Fixed Time#end_of_quarter to not blow up on May 31st [#313 Fixed Time#end_of_quarter. Returning the wrong time in some cases. state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

    September 19th, 2008 @ 03:07 PM