From: Austin Ziegler Date: 2004-04-19T11:30:07+09:00 Subject: Re: Thinking about a date-matching algorithm... Hal: I am now only 1,700 messages behind on ruby-talk, but I thought that I would respond to this -- and tell you what the PalmOS platform does for alarms. Basically, any application is allowed to set a single alarm at a time. The OS wakes up periodically (~1 minute) to service the alarms; when it detects that an alarm is due, it hands it over to the application to handle through its notification manager. The application, after handling the alarm's notification, is responsible for setting the *next* alarm for the application. >From the perspective of Tycho, I would recommend that you make each alert responsible for setting its next alert in a master alert list. It might look like this in the definition of the alert: Name: New Year's Day StartDate: 2001.01.01 Recurs: [object representing this date every year] NextDate: 2005.01.01 In your alarm file, you might have: Today: 2004.04.18 2004.05.12: [Mother's Day (US), ...] 2004.05.24: [Memorial Day (US), ...] ... 2005.01.01: [New Year's Day] You would remove the appropriate date's alarm listing, but call #next_alert_date on each object in the day's list. This is provided without having read the rest of the thread you had here :) -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2004.04.18 * 22:17:08