In my scenario, I have a event ($e_1$) with
1. Start datetime for the event -> 2/10/2008
2. Frequency for its occurrence -> 2 days
3. End datetime for the event -> 14/11/2020
So now, let me explain what am'I struggling with is:
Let us consider google calendar, in which you could have seen the recurring events (Repeat events). As the values are provided above, with the start datetime I will start calculating the next event occurrences.
eg) Event(e1)
1. Start datetime for the event -> 2/10/2008
2. Frequency for its occurrence -> 2 days
3. End datetime for the event -> 14/11/2020
1st occurrence --> 2/10/2008
2nd occurrence --> 1st occurrence + frequency
3rd occurrence --> 2nd occurrence +frequency
.
.
upto the nth day (which we will provide)
Lets assume the scenario that, When the user goes to the google calendar, then obviously the user had to see the current month and it's events. So the current date is
current date is 8/11/2014
Events for a particular month in future:
So I need the events which occurs on 11th month. Then the Event($e_1$) will come under this condition which occurs between 2/10/2008 and 14/11/2020.
When does the event($e_1$) starts for a particular month in future?
Now we know that the Event($e_1$) occurs for every 2 days with start datetime 2/10/2008, then at the november month of 2014 when does the event starts.
Initially the event starts at 2nd October of 2008 and the very next month it starts at the 1st of November 2008 and then for the upcoming events it can be either 1 or 2 of the month. So what will be the start date for the November of 2014.
Note:
For example I have mentioned that the Frequency for the events occurrence is 2 days but it can vary from 1 to 30.
I'm new to math stack overflow so apologize me if my question is not clear or not understandable. Please let me know, do I need to do changes at the question to make it understandable or do I need to provide any sample scenario. Also provide some suggestions which tags can be added for this question. Thanks in advance.