Setting up a reminder which has no end date

158 Views Asked by At

I'm currently building "reminder" functionality into a larger system. I'm able to create reminders that have a specific number of occurrences, as well as reminders with a definitive end date. I essentially add a number of entries into a table, and this also allows them to check off the tasks as each item is completed.

However, if a user wants an reminder with an indefinite end date, what is the typical way of handling this? I assume entering in 50+ years worth of entries isn't particularly efficient, and if doing this strictly in code and parsing out the items one by one, I need to determine if past reminders were completed, and not show them again.

How does outlook handle this behind the scenes, or google calendar?

1

There are 1 best solutions below

4
On BEST ANSWER

Use recurrence patterns. Most scheduling systems do not store individual occurrences in a database. iCal uses a format called RRule, which is pretty popular. There is an iCal.Net library that can parse iCal RRules.

As for past reminders, that is what should be stored in the database. Store occurrences that have been completed.

https://github.com/rianjs/ical.net