On Fri, 29 Apr 2005, kellan wrote:

Actually recurrence exceptions are one really good reason why its hard
to ever come up with an elegant, purely rule based recurrence
representation.  For events involving humans its inevitable that
sometimes this month's occurrence will get cancelled or re-scheduled.

Well, the trick is to make complex recurrences like this an actual data type in the DBMS.


 SELECT ...
   FROM RecurringEvent
  WHERE OVERLAPS(recurrence, $start_date, $end_date)
 UNION
 SELECT ...
   FROM Event
  WHERE start_date >= $start_date
    AND end_date <= $end_date

See how nice and simple that is ;)

Surely implementation of that data type is just a SMOP!

Hehe. Actually, if there were a DBMS that supported writing custom data types in Perl we'd be a long way towards that goal.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to