Page 1 of 1

Calendar - Events to span multiple days

Posted: Wed May 06, 2009 3:38 am
by CRichardson
I am in the process of developing a calendar application.

At the moment I am trying to find a method which allows events to span over multiple days.

It has already caused many hours of problems!

Storing and retrieving the information is not a problem.

For example, let's say an event starts on 01/04/2009 and ends on 05/04/2009. I would like to show that information literately and visually spanning over those days.

Has anybody developed anything like this before? Can anybody offer any advice at all? :D

Please see attached example for better understanding.

Re: Calendar - Events to span multiple days

Posted: Wed May 06, 2009 4:06 pm
by Yossarian
There are 2 schools of thought that I have come across.

a) as you have said, a start and end date.

your dbase is full of entries that start and end on the same day
entries seem to go on through midnight and the early hours and into the next day - is that what you want?
works nicely for "I am on holiday"
"whats on today" views can cause complex sql statements

b) each day is an entry, so a 5 day event has 5 entries.

does not work so nicely for "I am on holiday" unless you factor it in and simplify the ui
works nicely for "I have to attend training every morning next week"
works nicely for time slots
works nicely for recurring events (book every tuesday evening 'till September)
works nicely for single events, you are only storing start time / end time
"whats on today" sql is very simple

I think a lot depends upon the expected use of your calendar.