Reputation: 30598
OK, let's say I am writing a calendar application in which a user can create an event. An event can occur in the following situations:
1 time only.
Every Period of time keep reply, until a day.
Every Period of time keep reply, until a day, except some days.
Every some kind of week day.
Let me explain in a detailed example:
1 time only: 24/8/2011 ONLY.
Every Period of time keep reply, until a day: 25/8/2011 Start, and every week end will have this event, until 30/10/2011.
Every Period of time keep reply, until a day, except some days: 25/8/2011 Start, and every week end will have this event, until 30/10/2011, except the 10/09/2011 and 17/09/2011.
Every some kind of week day, .
Every some kind of week day, except some days.
Upvotes: 1
Views: 49
Reputation: 4366
Martin Fowler wrote a nice big article about just this topic a few years ago. Rather than repeat his analysis, I'll just point you at the pdf. It's called Recurring Events For Calendars.
Upvotes: 2