I am trying to store recurrence event information into a database. I want to store recorder into a a Database table with the following fields.
- Start Date - Datetime
- End Date - DateTime
- RecurrencePattern - string
I wanted to see if there was already some standard format to store the RecurrencePattern in and an associated library to parse out this string recurrenPattern and a start / end date and convert into a set of dates. I see this exists for javascript so maybe a port to C# or something similar ?
To serialize the event to the db, do i really have to create a new iCalendar and serialize a calendar for each event ? Would there be a way to simply serialize the event by itself to the db using this library?
Updated question regarding DDay.iCal per Jon Skeet's answer:
As per jon skeet's suggestion, i started looking at DDay.iCal and it looks very good. My one follow up question is that it seems to only read a full ical (ics) at a time from disk in the example. In my case i am just storing events independently in a database table. What would be the best way:
- To read in these events from the DB
- To save independent events to the DB (each event is a row in a db table)
using this library?