From: Jeremy Hinegardner Date: 2004-03-19T00:52:40+09:00 Subject: Re: Thinking about a date-matching algorithm... >>>>> "Hal" == Hal Fulton writes: Hal> I did a little swapping of ideas with dblack on this. Now I'm Hal> opening discussion to anyone interested. Hal> I'm writing a little to-do manager (chiefly for my own use). Hal> I want to allow recurring tasks. Some of these will be simple, like Hal> "Every Monday." Others will be more complex, like "Every 2nd and Hal> 4th Friday." Some might not even be based on weeks or months at Hal> all, but might be like: "Every ten days, no matter what." Hal> There'd also be an option to give advance warning (N days) on each Hal> event. Hal> So the question becomes: Given a date (typically "today") and a Hal> list of recurring tasks, how do I determine which ones need to be Hal> displayed? You might check out the remind application and see what algorithms it uses. Its been around a while and can do some fairly complex recurring tasks. http://www.roaringpenguin.com/products/remind/index.php Also "Calendrical Calculations" by Nachum Dershowitz and Edward M. Reingold is a great general purpose calendaring book. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy@hinegardner.org