I'm trying to simulate the MatchesDateOnly for my recurrence rule "ExcludeDates" which I'm storing as date only values. I want my RRULE to ignore certain date only periods.
Previously in DDay we could specify:
if (!recurrenceOptions.ExcludeDates.IsNullOrEmpty ())
{
var periodList = new PeriodList ();
recurrenceOptions.ExcludeDates.ForEach (d =>
{
var period = new Period (new iCalDateTime (d), TimeSpan.FromDays (1)) { MatchesDateOnly = true };
periodList.Add (period);
});
iCalEvent.ExceptionDates.Add (periodList);
}
var occurences = iCalEvent.GetOccurrences (range.StartDate, range.EndDate);
How can I mimic this functionality in iCal.net?
You can try with RecurrencePatternEvaluator