Finding occurrences of a recurring event that are after some date
See original GitHub issueI am trying to understand the event API. iterator() gets a start date but then uses that event as the base date-time to generate recurring events and ignores the event’s original dtstart. I am interested of finding the occurrences that happen after today for example and the only solution I found is to make a loop until it reaches the date-time I am interested in and this is not a neat solution.
var iter = event.iterator();
var next = iter.next();
for (; next; next = iter.next()) {
var occurrence = event.getOccurrenceDetails(next);
if (isOccurrenceNow(datetime, occurence)) {
return occurrence;
}
}
Am I missing something? I think from API point of view, event.iterator(startDate) would be more meaningful if it would the occurrences of the event from this point forward.
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Finding occurrences of a recurring event that are after some date
I am trying to understand the event API. iterator() gets a start date but then uses that event as the base date-time to...
Read more >How can I use the occurrences to calculate the end date of a ...
1 Answer 1 · Keep it simple. · Introduce your own types to represent exactly what you know about the event. · Make...
Read more >How to Quickly Count the Occurrences of a Recurring Outlook ...
Count the Occurrences of a Recurring Appointment in a Specific Date Range · First off, select or open the source recurring appointment. ·...
Read more >A function to calculate recurring dates - sqlsunday.com
@start: The start date of the recurrence pattern. @end: The end date of the recurrence pattern. @occurrences: The maximum number of occurrences.
Read more >Again and Again! Managing Recurring Events In a Data Model
The Naive Way: Storing all possible recurring instances of an event as separate rows in a table. In this solution, we require only...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kewisch Was this ever pulled upstream?
@kewisch I am wondering what is the api call to get all recurring occurrences between two dates. After looking at the api I can’t find the api call that you state is being added to address this need. Thanks.