Hi,
I want to ask for some tips for using the schedularHelper class as far as collision checking is concerned.
I’m trying to check if event collide:
for example:
I’m creating recurring event with this data:
Time period: 2013-08-19 10:30 - 2013-08-19 12:20
Repeated daily, every 1 day, finish after 5 occurances
In db it looks like that:
event_id:124
start_date:2013-08-19 10:30:00
end_date:2013-08-24 10:30:00
text:test
rec_type:day_1___#5
event_pid:0
event_length:6600
Then I want to add event at day after last occurance:
start_date: 2013-08-24 10:05
end_date: 2013-08-24 12:45
Using schedulerHelper get_dates(‘2013-08-24 10:05’,‘2013-08-24 12:45’); for checking if there are some events from recurring ones I get array with:
[event_id] => 124
[start_date] => 2013-08-24 10:30:00
[end_date] => 2013-08-24 12:20:00
[text] => test
[rec_type] => day_1___#5
[event_pid] => 0
[event_length] => 6600
As I understand this function should return only events that are somehow in collision with new event - so my question is why it returns recurring event occurrence that in reality doesn’t exists as last occurrence from the series should end with 23 Aug 2013 12:20 and mentioned occurence from 24 Aug shouldnt be there…
Anyone have idea how to deal with it?
Regards,
Grzesiek