Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every day for all of time, except Tuesday,Thursday,Saturday,and Sunday" Not working #298

Closed
Gomitak opened this issue Jun 15, 2017 · 1 comment · Fixed by #673
Closed
Labels

Comments

@Gomitak
Copy link

Gomitak commented Jun 15, 2017

var vEvent = new Event
{
Summary = "BIO CLASS",//subject
Description = "Details at CLASS",//description of meeting
Location = "Building 101",//location
DtStart = new CalDateTime(DateTime.Parse("2017-06-01T08:00")),
DtEnd = new CalDateTime(DateTime.Parse("2017-06-01T09:30")),
RecurrenceRules = new List { new RecurrencePattern(FrequencyType.Daily, 1) },
};

            //Define the exceptions: Sunday
            var exceptionRule = new RecurrencePattern(FrequencyType.Weekly, 1)
            {
                ByDay = new List<IWeekDay> { new WeekDay(DayOfWeek.Sunday), new WeekDay(DayOfWeek.Saturday),
                new WeekDay(DayOfWeek.Tuesday),new WeekDay(DayOfWeek.Thursday)}
            };
            vEvent.ExceptionRules = new List<IRecurrencePattern> { exceptionRule };

            calendar.Events.Add(vEvent);
@Gomitak
Copy link
Author

Gomitak commented Jun 15, 2017

The code seems to ignore the exceptionRule and places the event everyday.

axunonb added a commit to axunonb/ical.net that referenced this issue Dec 18, 2024
Updated `CalendarEvent` and `EventEvaluator` to enhance event handling,
particularly around time zones and daylight saving time transitions.

Key changes include:

- Enabled nullable reference types in `CalendarEvent` and `EventEvaluator.`
- Updated `CalendarEvent` to throw `InvalidOperationException` when trying to set both `DtEnd` and `Duration`.
- Event end time and duration calculations in `EventEvaluator` reflect any DST transitions.
- Added new test class `RecurrenceTests_From_Issues` to validate changes with various edge cases and scenarios.

Resolves ical-org#660
Resolves ical-org#623
Resolves ical-org#671
Resolves ical-org#567
Resolves ical-org#342
Resolves ical-org#298
axunonb added a commit to axunonb/ical.net that referenced this issue Dec 18, 2024
Updated `CalendarEvent` and `EventEvaluator` to enhance event handling,
particularly around time zones and daylight saving time transitions.

Key changes include:

- Enabled nullable reference types in `CalendarEvent` and `EventEvaluator.`
- Updated `CalendarEvent` to throw `InvalidOperationException` when trying to set both `DtEnd` and `Duration`.
- Event end time and duration calculations in `EventEvaluator` reflect any DST transitions.
- Added new test class `RecurrenceTests_From_Issues` to validate changes with various edge cases and scenarios.

Resolves ical-org#660
Resolves ical-org#623
Resolves ical-org#671
Resolves ical-org#567
Resolves ical-org#342
Resolves ical-org#298
@axunonb axunonb added the bug label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants