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?

Check the archives, Hal. I’m almost positive it was this group I
read from Dossy a ways back about a TCL or Python app which did
exactly that.

It used a full-on BNF grammar, if I recall correctly.

···

Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam

Michael Campbell wrote:

Check the archives, Hal. I’m almost positive it was this group I
read from Dossy a ways back about a TCL or Python app which did
exactly that.

It used a full-on BNF grammar, if I recall correctly.

I’ll check. But I don’t see how parsing relates. I’m not trying
to parse strings.

Hal