Forum OpenACS Development: Re: Multiday event support in OpenACS Calendar Application

Hi Poonam,

Although the calendar datamodel is prepared for multiday events, the logic to display them is not. So beside modifying the form to create/edit events, the day/week/month views would have to be modified too.

Yes , you are right

But again, for displaying the events we use a query which returns all the events for a particular day in case of day view.
Now my question is how the event would be picked up for a particular day which is not the start date or end date but somewhere in between ( 20th july in case of the example given in 10th post by me )

I don't think display logic can do anything if the row itself is not selected by multirow. Please correct me if i am wrong.
I would appreciate if you could explain how the above event would be handled with your solution

Thanks and Regards,
Poonam

oh I see, I missed that, sorry.

The query to retrieve events needs to be rewritten to get not only the events starting or ending in the day, but also, as you said, those that are in between. You can use the OVERLAPS operator to check that:

select (event_start_date,event_end_date) OVERLAPS (view_start_date,view_end_date);

See http://www.postgresql.org/docs/8.2/static/functions-datetime.html for more info.

Hey thanks a ton !
It seems to be working. I would change all the queries to get the expected result. The only overhead would be validating "end date" against "start date"

Thanks again :)

Thanks and Regards,
Poonam