Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Ical.Net/CalendarComponents/IRecurrable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Licensed under the MIT license.
//

using System;
using System.Collections.Generic;
using Ical.Net.DataTypes;
using Ical.Net.Evaluation;
Expand All @@ -17,7 +18,10 @@ public interface IRecurrable : IGetOccurrences
CalDateTime? Start { get; set; }

ExceptionDates ExceptionDates { get; }

[Obsolete("EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version")]
IList<RecurrencePattern> ExceptionRules { get; set; }

RecurrenceDates RecurrenceDates { get; }
IList<RecurrencePattern> RecurrenceRules { get; set; }
CalDateTime? RecurrenceId { get; set; }
Expand Down
1 change: 1 addition & 0 deletions Ical.Net/CalendarComponents/RecurringComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ internal IList<PeriodList> ExceptionDatesPeriodLists

public virtual ExceptionDates ExceptionDates { get; internal set; } = null!;

[Obsolete("EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version")]
public virtual IList<RecurrencePattern> ExceptionRules
{
get => Properties.GetMany<RecurrencePattern>("EXRULE");
Expand Down
1 change: 0 additions & 1 deletion Ical.Net/Evaluation/RecurrencePatternEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ private static IEnumerable<CalDateTime> GetAbsWeekDaysWeekly(CalDateTime date, R

//When we manage weekly recurring pattern and we have boundary case:
//Weekdays: Dec 31, Jan 1, Feb 1, Mar 1, Apr 1, May 1, June 1, Dec 31 - It's the 53th week of the year, but all another are 1st week number.
//So we need an EXRULE for this situation, but only for weekly events
while (currentWeekNo == weekNo || (nextWeekNo < weekNo && currentWeekNo == nextWeekNo && pattern.Frequency == FrequencyType.Weekly))
{
if ((byWeekNoNormalized.Count == 0 || byWeekNoNormalized.Contains(currentWeekNo))
Expand Down
1 change: 1 addition & 0 deletions Ical.Net/Evaluation/RecurringEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
/// </summary>
/// <param name="referenceDate"></param>
/// <param name="options"></param>
[Obsolete("EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version")]
private IEnumerable<Period> EvaluateExRule(CalDateTime referenceDate, EvaluationOptions? options)
{
if (!Recurrable.ExceptionRules.Any())
Expand Down Expand Up @@ -119,7 +120,7 @@
periods = periods.Where(p => (p.StartTime >= periodStart) || (p.EffectiveEndTime > periodStart));
}

var exRuleExclusions = EvaluateExRule(referenceDate, options);

Check warning on line 123 in Ical.Net/Evaluation/RecurringEvaluator.cs

View workflow job for this annotation

GitHub Actions / coverage

'RecurringEvaluator.EvaluateExRule(CalDateTime, EvaluationOptions?)' is obsolete: 'EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version'

Check warning on line 123 in Ical.Net/Evaluation/RecurringEvaluator.cs

View workflow job for this annotation

GitHub Actions / coverage

'RecurringEvaluator.EvaluateExRule(CalDateTime, EvaluationOptions?)' is obsolete: 'EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version'

Check warning on line 123 in Ical.Net/Evaluation/RecurringEvaluator.cs

View workflow job for this annotation

GitHub Actions / tests

'RecurringEvaluator.EvaluateExRule(CalDateTime, EvaluationOptions?)' is obsolete: 'EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version'

Check warning on line 123 in Ical.Net/Evaluation/RecurringEvaluator.cs

View workflow job for this annotation

GitHub Actions / tests

'RecurringEvaluator.EvaluateExRule(CalDateTime, EvaluationOptions?)' is obsolete: 'EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version'

Check warning on line 123 in Ical.Net/Evaluation/RecurringEvaluator.cs

View workflow job for this annotation

GitHub Actions / coverage

'RecurringEvaluator.EvaluateExRule(CalDateTime, EvaluationOptions?)' is obsolete: 'EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version'

Check warning on line 123 in Ical.Net/Evaluation/RecurringEvaluator.cs

View workflow job for this annotation

GitHub Actions / coverage

'RecurringEvaluator.EvaluateExRule(CalDateTime, EvaluationOptions?)' is obsolete: 'EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version'

Check warning on line 123 in Ical.Net/Evaluation/RecurringEvaluator.cs

View workflow job for this annotation

GitHub Actions / tests

'RecurringEvaluator.EvaluateExRule(CalDateTime, EvaluationOptions?)' is obsolete: 'EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version'

// EXDATEs could contain date-only entries while DTSTART is date-time. This case isn't clearly defined
// by the RFC, but it seems to be used in the wild (see https://github.com/ical-org/ical.net/issues/829).
Expand Down
1 change: 1 addition & 0 deletions Ical.Net/VTimeZoneInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ internal IList<PeriodList> ExceptionDatesPeriodLists

public virtual ExceptionDates ExceptionDates { get; private set; } = null!;

[Obsolete("EXRULE is marked as deprecated in RFC 5545 and will be removed in a future version")]
public virtual IList<RecurrencePattern> ExceptionRules
{
get => Properties.GetMany<RecurrencePattern>("EXRULE");
Expand Down
Loading