Boost logo

Boost :

From: Svensson Tommy (c) (tommy.c.svensson_at_[hidden])
Date: 2003-01-13 08:22:00


Hi,

I need a library which allowes me to define and handle recurring events. Of course, I thought that Boost would help me out by providing such a handy-dandy class out of the box.

Btw, by recurring events I mean events which can be configured to occur for example: every monday and thursday, last friday in month, every second tuesday, every friday the 13th, and so on... Much like crontab or MS-Outlook's recurrence appointments.

Unfortunately, there is no such class in the Date-Time library. I don't know, but maybe such a class doesn't fit in a library?

Anyhow, I think it would be really nice to say something like:
recurring_event<daily> wakeMeUp("09:45");
recurring_event<weekly> trainingDays(monday,thursday);
recurring_event<weekly> cleaningDay(tuesday,every_2nd);
recurring_event<monthly> receiveSalary(friday,last_day_in_month);
recurring_event<yearly> santa(christmas_day);

Does anyone have an idea or hint how to implement such a class (maybe out of different boost-classes)? Otherwise I know one way to go, based on the paper "Recurring Events" written by Martin Fowler and available on his site martinfowler.com.

Btw, when I searched the archive I saw that at least one other user (Dylan) had a similar request/desire for such a utility.

/Tommy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk