我尝试为我的重复规则模拟MatchesDateOnly" ExcludeDates"我只存储日期值。我希望我的RRULE只忽略某些日期。
以前在DDay中我们可以指定:
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);
如何在iCal.net中模仿此功能?