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

Migrating to iCal.net Period - Matches Date Only #317

Open
gjdownes opened this issue Sep 21, 2017 · 2 comments
Open

Migrating to iCal.net Period - Matches Date Only #317

gjdownes opened this issue Sep 21, 2017 · 2 comments

Comments

@gjdownes
Copy link

gjdownes commented Sep 21, 2017

I'm trying to simulate the MatchesDateOnly for my recurrence rule "ExcludeDates" which I'm storing as date only values. I want my RRULE to ignore certain date only periods.

Previously in DDay we could specify:

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);

How can I mimic this functionality in iCal.net?

@axunonb
Copy link
Collaborator

axunonb commented Dec 23, 2024

Probably related to #501 (date-only serializes as PERIOD)

@axunonb
Copy link
Collaborator

axunonb commented Jan 19, 2025

Should be resolved with #684
Could you give it a try using one of the daily builds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants