Hmm... I've taken a look at the format_recurrence and other code in the test.
 
Your proposed solution will work fine if I trust my content contributors to 
define recurrence patterns in a meaningful way out of the gate... but what if 
they add each event occurrence as a discrete date -- even though it follows a 
pattern; e.g. they enter every Friday in March as a separate date rather than 
specifying a recurring event by week with dow = Friday bounded by 3/1 and 3/31. 
 More likely, they might enter a series of dates not realizing that the dates 
even follow an established pattern.
 
I guess what I'm looking for is some code to take an arbitrary list of dates 
and a prioritized list of pattern types (e.g. I would prefer to display by 
"weekly by day of week" if such a pattern can be found in these dates) and to 
then search for a combination of those patterns within the supplied list that 
results in 100% coverage while minimizing complexity... then would I apply the 
ICAL to human sentence parser...
 
In retrospect, this might make a good CS dissertation; probably a bit on the 
complex side.
 
In the near term, I might be better off just custom coding a small set of 
acceptable date presentations, e.g. month / list of days or span of days in 
month when event occurs / times when event occurs on those days, and be done 
with it; such as Jan 1-5, 8-12, and 27 at 3:00 p.m. and 4:30 p.m. instead of 
"Weekdays in the first two weeks in January as well as the 27th of January at 
3:00 p.m. and 4:30 p.m." 

        -----Original Message----- 
        From: Flavio S. Glock [mailto:[EMAIL PROTECTED] 
        Sent: Sat 11/25/2006 6:49 PM 
        To: [email protected] 
        Cc: 
        Subject: Re: Date Span Formatter
        
        

        2006/11/24, Beaudet, David P. <[EMAIL PROTECTED]>:
        > I'm working on an extension to the Bricolage CMS to handle event 
schedules and am specifically looking for a Perl module to create a human 
readable schedule listing from a sequence of date time spans...
        
        DateTime::Format::Natural is the place to implement this, but it isn't
        finished yet.
        
        DateTime-Format-ICal provides an ICal text output, which is structured
        enough to be parsed&formatted into human-readable sentences.
        
        There are some examples of the ICal output here:
          
http://search.cpan.org/src/DROLSKY/DateTime-Format-ICal-0.08/t/04recurrence.t
        
        - Flavio S. Glock
        

Reply via email to