Rick Measham wrote:
> @months = DateTime::SQL->new("SELECT month WHERE dow=5 AND day=13 AND
> year=2003");
> # Get months with Friday 13th.
> 
> While I'm only kidding, at the same time it might be a good thing. It
> would be slow I imagine, but it would be very useful.

DBD::DateTime ? :)

Take a look at DateTime::Format::ICal - it's almost there:

  my $recur =
    $ical->parse_recurrence
       ( recurrence =>
'FREQ=MONTHLY;UNTIL=20040101T000000Z;BYMONTHDAY=13;BYDAY=FR',
         dtstart    => $ical->parse_datetime( '20030101T000000' )
       );

All we need is a small change in the parser!
It would not be slower than DT::E::Recurrence itself.

- Flavio S. Glock

Reply via email to