迁移到iCal.net期间 - 仅匹配日期

时间:2017-09-21 01:16:38

标签: c# icalendar ical-dotnet

我尝试为我的重复规则模拟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中模仿此功能?

0 个答案:

没有答案