سؤال

I've got an Outlook RecurrencePattern. Is there any library or code snippet to get the next occurence of an appointment or date in the recurrence pattern.

هل كانت مفيدة؟

المحلول 2

نصائح أخرى

I know this answer is 1 year too late but it's better then never I guess. There is the GetOccurrence method in the RecurrencePattern class, which, unfortunately can only get you an occurrence if you know the start time of the occurrence.

That been said, if you already know the start time of a current occurrence, you can work out what the next start time is by looking at the properties in the recurrence pattern.

Except the next occurrence is a modified occurrence whose start time has been changed. In this case, you then need to work out the start time of the "next next" occurrence, then look into the Exceptions collection of the recurrence pattern, and look for one whose start time is between your current occurrence's start time and the "next next" occurrence's start time. Because Outlook does not allow you to modify the start time of an recurring appointment occurrence to be either earlier then the previous occurrence or later than the next occurrence.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top