From: paul vudmaska Date: 2004-03-18T23:00:39+09:00 Subject: Thinking about a date-matching algorithm --- Hal Fulton > wrote: > I did a little swapping of ideas with dblack on > this. Now I'm > opening discussion to anyone interested. > > I'm writing a little to-do manager (chiefly for my > own use). > > I want to allow recurring tasks. Some of these will > be simple, like > "Every Monday." Others will be more complex, like > "Every 2nd and 4th > Friday." Some might not even be based on weeks or > months at all, but > might be like: "Every ten days, no matter what." > > There'd also be an option to give advance warning (N > days) on each > event. > > So the question becomes: Given a date (typically > "today") and a list > of recurring tasks, how do I determine which ones > need to be displayed? > > > Cheers, > Hal Looking at the subject, naturally i came up with this. if female.fav.color == male.fav.color collectfee arrangemarriage else next end :), hth