Skip Menu |

This queue is for tickets about the DateTime-Set CPAN distribution.

Report information
The Basics
Id: 108633
Status: resolved
Priority: 0/
Queue: DateTime-Set

People
Owner: Nobody in particular
Requestors: brett.watson [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Recurrent event does not intersect indefinite future
Date: Tue, 10 Nov 2015 11:41:39 +1100
To: bug-DateTime-Set [...] rt.cpan.org
From: Brett Watson <brett.watson [...] gmail.com>
DateTime-Set-0.3400 on Perl v5.8.8 built for i386-linux-thread-multi (yeah, old) $hourly = DateTime::Event::Recurrence->hourly; $next_day = DateTime::Span->from_datetimes(start => DateTime->now, end => DateTime->now->add(days => 1)); $future = DateTime::Span->from_datetimes(start => DateTime->now); ok($next_day->intersects($future), "next day intersects future"); ok($hourly->intersects($next_day), "hourly event intersects next day"); ok($hourly->intersects($future), "hourly event intersects future"); # FAILS!
Subject: Re: [rt.cpan.org #108633] Recurrent event does not intersect indefinite future
Date: Tue, 10 Nov 2015 09:41:35 +0100
To: bug-DateTime-Set [...] rt.cpan.org
From: "Flavio S. Glock" <fglock [...] gmail.com>
I can reproduce the problem with perl 5.22.0 - investigating 2015-11-10 1:41 GMT+01:00 Brett Watson via RT <bug-DateTime-Set@rt.cpan.org>: Show quoted text
> Mon Nov 09 19:41:53 2015: Request 108633 was acted upon. > Transaction: Ticket created by brett.watson@gmail.com > Queue: DateTime-Set > Subject: Recurrent event does not intersect indefinite future > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: brett.watson@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=108633 > > > > DateTime-Set-0.3400 > on Perl v5.8.8 built for i386-linux-thread-multi (yeah, old) > > $hourly = DateTime::Event::Recurrence->hourly; > $next_day = DateTime::Span->from_datetimes(start => DateTime->now, end => > DateTime->now->add(days => 1)); > $future = DateTime::Span->from_datetimes(start => DateTime->now); > > ok($next_day->intersects($future), "next day intersects future"); > ok($hourly->intersects($next_day), "hourly event intersects next day"); > ok($hourly->intersects($future), "hourly event intersects future"); # FAILS! >
Subject: Re: [rt.cpan.org #108633] Recurrent event does not intersect indefinite future
Date: Tue, 10 Nov 2015 12:04:33 +0100
To: bug-DateTime-Set [...] rt.cpan.org
From: "Flavio S. Glock" <fglock [...] gmail.com>
update: The intersects() method returns 0 or 1 on success. It returns "undef" if the algorithm can't decide if there is an intersection. $hourly->intersects($future) is returning undef, which looks like a bug because this operation should be decidable, and it works for many other sets. The intersects() documentation needs a patch to explain the 'undef' vs. 0 behaviour. 2015-11-10 9:42 GMT+01:00 Flavio S. Glock via RT <bug-DateTime-Set@rt.cpan.org>: Show quoted text
> Queue: DateTime-Set > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=108633 > > > I can reproduce the problem with perl 5.22.0 - investigating > > 2015-11-10 1:41 GMT+01:00 Brett Watson via RT <bug-DateTime-Set@rt.cpan.org>:
>> Mon Nov 09 19:41:53 2015: Request 108633 was acted upon. >> Transaction: Ticket created by brett.watson@gmail.com >> Queue: DateTime-Set >> Subject: Recurrent event does not intersect indefinite future >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: brett.watson@gmail.com >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=108633 > >> >> >> DateTime-Set-0.3400 >> on Perl v5.8.8 built for i386-linux-thread-multi (yeah, old) >> >> $hourly = DateTime::Event::Recurrence->hourly; >> $next_day = DateTime::Span->from_datetimes(start => DateTime->now, end => >> DateTime->now->add(days => 1)); >> $future = DateTime::Span->from_datetimes(start => DateTime->now); >> >> ok($next_day->intersects($future), "next day intersects future"); >> ok($hourly->intersects($next_day), "hourly event intersects next day"); >> ok($hourly->intersects($future), "hourly event intersects future"); # FAILS! >>
>
fixed in DateTime::Set 0.3500 bug: there was no intersects() method for recurrences; the SUPER call returned undef. solution: implemented intersects() for recurrences, based on the existing intersection() method.