PDA

View Full Version : which calendar module should I find to be better?


bazz
05-21-2007, 12:47 PM
Hi Guys,

I am in need of a calendar module and am not sure which I should use.

I want to list events by their start date and end date. Think of a film run at the cinema starting at 1st June 2007 and running thru until 16th July 2007.

I want to be able to list such 'events' by start and end date so that if they are in the past, they do not display and if more than 30 days ahead of a chosen date, they don't display either.

so I need to be able to compare a date with a user-entered date.
http://search.cpan.org/~yewenbin/Calendar-0.01/lib/Calendar.pm

is this module OK? Maybe I would be better with another one. Your advice please?


bazz

mlseim
05-21-2007, 05:09 PM
Bazz ...

It this off of a MySQL database or flat-file?

And will it display as a text list, or an actual calendar grid?

FishMonger
05-21-2007, 06:37 PM
I haven't used that module, but if it does everything you want/need, I don't see any reason not to use it.

If you want/need more functionality, then you might want to look at Date::Calc
http://search.cpan.org/~stbey/Date-Calc-5.4/Calc.pod

bazz
05-21-2007, 06:55 PM
Hi,

@mlseim,

It's off a MySQL Db.
This is to output a series of events such a baseball, golf tournaments, concerts and the like.

The purpose of the date thing is for two things:

firstly, to make sure that only those events still in the future can show. So there'll be a date comparision with "today's" date.

Secondly, the user can choose which dates they are interested in and it'll compare with that/those dates, the date of the event and display accordingly.

I also would use the module for a reservations sytem. (No I am not re-inventing the wheel: I am just bringing out a new style. :) )

So in answer to your question, it'll basically be outputted as a text list for one purpose and as a calendar in the other. For the calendar I need to assign the day of week ie Mon Tues etc with the date of week.

@FishMonger

I'll look at Date::Calc. My Server management company installed the module Date::Manip on foot of my question about which modules were already installed. I read in cpan the writing of the author who said it is quite slow because it is so big. Maybe thats a negative point or maybe it doesn't matter. I suppose it depends on whether he was talking in nanoseconds or visual slowness. I would appreciate your thoughts/experience.

Thanks to you both

FishMonger
05-21-2007, 07:08 PM
I've used both Date::Calc and Date::Manip. Manip does "anything and everything" with dates and is a little slower, but unless you're doing a lot of complex date calculations, you probably won't notice the difference.

FishMonger
05-21-2007, 07:12 PM
You should also look into using some of the MySQL date functions.

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

bazz
05-21-2007, 07:30 PM
Great Fishmonger,

I'll look into that more tomorrow.

bazz