Timespan bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Timespan bug

Steve Aldred-3
Sorry for posting this here but I don't use Squeak itself and hence
aren't on the main squeak list.

As a VW Seaside user I do use Squeak extensions. There is a bug in
Timespan as shown below:

  (Year starting: (DateAndTime year: 2008 month: 1 day:1)) previous

The result should be 2007 but it returns 2006.

Year should implement previous the same as Month does.

cheers
Steve
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Timespan bug

Philippe Marschall
That's not a Seaside but, that's a Squeak bug. Please report to the
appropriate channels, either Cincom or Squeak:
http://bugs.squeak.org/

Cheers
Philippe


2008/6/16, Steve Aldred <[hidden email]>:

> Sorry for posting this here but I don't use Squeak itself and hence aren't
> on the main squeak list.
>
>  As a VW Seaside user I do use Squeak extensions. There is a bug in Timespan
> as shown below:
>
>   (Year starting: (DateAndTime year: 2008 month: 1 day:1)) previous
>
>  The result should be 2007 but it returns 2006.
>
>  Year should implement previous the same as Month does.
>
>  cheers
>  Steve
>  _______________________________________________
>  seaside mailing list
>  [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Timespan bug

David T. Lewis
In reply to this post by Steve Aldred-3
On Mon, Jun 16, 2008 at 01:50:43PM +1000, Steve Aldred wrote:

> Sorry for posting this here but I don't use Squeak itself and hence
> aren't on the main squeak list.
>
> As a VW Seaside user I do use Squeak extensions. There is a bug in
> Timespan as shown below:
>
>  (Year starting: (DateAndTime year: 2008 month: 1 day:1)) previous
>
> The result should be 2007 but it returns 2006.
>
> Year should implement previous the same as Month does.

Steve,

Thanks for reporting this issue. I was going to enter a report on your
behalf in the Squeak bug tracking system, but it looks like Brent is
already on top of it :)

        http://bugs.squeak.org/view.php?id=7097

The bug report includes a proposed fix, which is straightforward if you
want to include it in your image:

        http://bugs.squeak.org/file_download.php?file_id=3386&type=bug

Brent's fix is as follows:

Year>>previous
        "This implementation handles leap years correctly"
        ^ self class year: (self year - 1)

Dave

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Timespan bug

Steve Aldred-3
Thanks David,

>> ...
>>  (Year starting: (DateAndTime year: 2008 month: 1 day:1)) previous
>>
>> The result should be 2007 but it returns 2006.
>>
>> ...
>>    
>
> Thanks for reporting this issue. I was going to enter a report on your
> behalf in the Squeak bug tracking system, but it looks like Brent is
> already on top of it :)
>  

Yes he was, Brent has already mailed us a fix.

cheers
Steve
> http://bugs.squeak.org/view.php?id=7097
>  

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside