Forum Moderators: coopster

Message Too Old, No Replies

Need advice on creating an Event Calendar

i.e. events always happen the third Friday of the month, etc.

         

Storyman

5:43 pm on Nov 6, 2004 (gmt 0)

10+ Year Member



I'm working on building an event calendar. It will have events that always happen during a certain month/week/day every year. For example, the third Saturday of the August a particular event occurs.

There doesn't seem to be any PHP functions that directly deal with this situation.

On a first pass it seems to use an array to sort out the days of the month, then work it from there. If this turns out to be like most programming adventures the first idea is not always the best.

Any ideas on how to solve this task?

mincklerstraat

6:09 pm on Nov 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One of the quirks of the PHP manual is that the 'date' functions are separate from the 'calendar' functions -

Before you get too advanced using date functions, be sure also to see the calendar functions at [php.net...]

You probably knew this, but I thought I'd mention it just-in-case (it took me a while to find those calendar functions, I'm not the type to read manuals cover to cover).

henry0

12:39 pm on Nov 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would like adding a few considerations on the calendar concept

Did you notice how ugly might become the most beautiful and well-thought calendar of events if at least 75% of its cols are not filled with events

So I recently started to offer a somehow different solution

Offering a script that will only echo non empty rows
Forget about the usual calendar display

And rely only on horizontal rows
That can be rendered with different BG color etc....

It results in a more compact page
Easily readable and direct to the point
You may also add a DB search.

Why bother clicking your way up two empty months to find only one event on the third month

Indeed the above applies only to a calendar with fewer events