Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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.

Thanks!

Ted Young

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

Comment on Calendar Framework
Download Code
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.

    blokhead

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-10-31 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (219 votes), past polls