Also,
Consider the case where an event starts at midnight, the DURATION is
1H (or the DTEND is 1 hour beyond DTSTART) and the event recurs, say
daily.
Now, if I set the recur frequency to daily with the dtstart an dtend
set according to this span of one hour and the appropriate dates, the
recur->contains value returned is FALSE.
E.g. if DTSTART is 20050906T000000, DTEND is 20050906T010000,
UNTIL=20050920T045959Z, FREQ=DAILY and DateTime->now() is
20050906T005812, shouldn't this be contained in the recurrence? I am
handling the dtend for the DateTime::Event::ICal->recur appropriately
using the time from DTEND and date from UNTIL.
Thanks.
-Chiradeep
On 05-Sep-05, at 6:16 PM, Flavio S. Glock wrote:
This may be a bug - I think byday=>["mo"] causes hour/min/second to
be zero.
I'll test this.
- Flavio S. Glock
2005/9/5, Chiradeep Chhaya <[EMAIL PROTECTED]>:
Hi
I am using the DateTime::Event::ICal->recur() function to calculate
recurrences and whether the rpesent date/time lies in the recurrence.
To state simply, my start and end dates as well as the recurrence are
declared as follows:
my $dt = DateTime->new( year => 2005,
month => '08',
day => 29,
hour => 15,
minute => 05,
second => 00
);
my $end = DateTime->new( year => 2005,
month => 11,
day => 27,
hour => 16,
minute => 25,
second => 00
);
my $set = DateTime::Event::ICal->recur(
dtstart => $dt,
freq => 'secondly',
interval => 1,
byday => ["mo"],
dtend => $end
);
And this is what I need to check
my $bool = $set->contains( DateTime->now() );
As of this writing, DateTime->now() returns 20050905T162355 in the
ICal format and the day is Monday.
I have two questions to ask here:
1) The bool value returned is FALSE whereas I believe it should be
true.
2) Without the byday and interval arguments, the bool value is TRUE.
Are these arguments causing issues?
Appreciate any help in this regard.
Many thanks
-Chiradeep