Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Calendar Framework

by TedYoung (Deacon)
on Mar 14, 2005 at 23:16 UTC ( #439494=perlquestion: print w/replies, xml ) Need Help??
TedYoung has asked for the wisdom of the Perl Monks concerning the following question:

Good day,

I need to add calendaring functionality to an existing perl-based content management system we developed last year. I can easily handle the UI portion of the calendar, and the adding/maintaining of events. What I am looking for is a toolkit to aid in the storage of recurring events. I would like to be able to persist the recurring events and, later, load an object that represents a month and allows me to exam the events that occur on each day.

Just for the record, by recurring events, I mean things like: this takes place on the first Monday of each month, starting from date A and ending on date B.

Are there any standards for the representation of recurring events (in a persistence layer)? Are there any good perl modules that can efficiently give me a month’s worth of events?

This is one of those cases where I want to be sure I am not about to re-invent the wheel.


Ted Young

($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)

Replies are listed 'Best First'.
Re: Calendar Framework
by blokhead (Monsignor) on Mar 15, 2005 at 06:37 UTC
    DateTime::Event::ICal is probably what you want. Although it doesn't help with the specific (de)serialization issue (I don't know if RFC2445 date recurrences have a standardized written syntax), it will definitely help with calculating when the recurring events happen.

    I would suggest having a standardized format (of your own creation, or as specified by RFC2445) for recurring events that you can easily parse into something to pass into the constructor for DateTime::Event::ICal. Then, you can query the DateTime::Set object it returns for all the dates in the recurrence between the first of the month and last of the month.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://439494]
Approved by rlb3
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2016-10-26 15:57 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (344 votes). Check out past polls.