OccurrenceCalculator.FindNextOccurrenceTimeAfter(DateTime, Appointment) Method
Searches for the first occurrence which corresponds to the pattern, and starts after the specified time.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.1.Core.dll
NuGet Package: DevExpress.Scheduler.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
after | DateTime | A DateTime object, representing the time after which the search is performed. |
pattern | Appointment | An Appointment instance, which is the pattern for the occurrence series. |
Returns
Type | Description |
---|---|
DateTime | A DateTime value, representing the start time of the first appointment in the occurrence chain that starts after the specified time, or the DateTime.MaxValue in the case of an unsuccessful search. |
Remarks
If the method fails, it returns the MaxValue, which equals the “12/31/9999 11:59:59 PM” date value. The method can fail when no occurrences are found or if the specified recurrence information is incorrect.
Note
Exceptions (changed or deleted occurrences) are not found using this method since they could not be calculated from a pattern. They are stored as individual appointment records in a data source.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FindNextOccurrenceTimeAfter(DateTime, Appointment) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.