/// <summary> /// Counts to until replace. For recurrence pattern /// </summary> /// <param name="dtStart">The dt start.</param> /// <param name="until">The until.</param> /// <param name="rpattern">The rpattern.</param> private static void CountToUntilReplace(iCalDateTime dtStart, iCalDateTime until, RecurrencePattern pattern) { //COUNT is specified if (pattern.Count > 0) { List <iCalDateTime> occurs = pattern.Evaluate(dtStart, dtStart, until); if (occurs.Count != 0 && occurs[occurs.Count - 1] >= until) { //Remove COUNT pattern.Count = int.MinValue; pattern.Until = until; } } else { pattern.Until = until; } }
/// <summary> /// Counts to until replace. For recurrence pattern /// </summary> /// <param name="dtStart">The dt start.</param> /// <param name="until">The until.</param> /// <param name="rpattern">The rpattern.</param> private static void CountToUntilReplace(iCalDateTime dtStart, iCalDateTime until, RecurrencePattern pattern) { //COUNT is specified if (pattern.Count > 0) { List<iCalDateTime> occurs = pattern.Evaluate(dtStart, dtStart, until); if (occurs.Count != 0 && occurs[occurs.Count - 1] >= until) { //Remove COUNT pattern.Count = int.MinValue; pattern.Until = until; } } else { pattern.Until = until; } }