I'm trying to build something that uses RRule for calculating something going forward. However to do so accurately it needs to do a retroactive calculation from the past.
In the scope of the code I have, DTStart is the previous event it had to calculate for. But I would love to be able to accurately see the event before that?
Is there a way to do this?
I technically can take the DTStart.Next() and then take the time difference between the two and subtract that from DTStart. But for a rule like FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=15,-1 this is not reliable, because the number of days between recurrences can be different each time.
I'm trying to build something that uses RRule for calculating something going forward. However to do so accurately it needs to do a retroactive calculation from the past.
In the scope of the code I have, DTStart is the previous event it had to calculate for. But I would love to be able to accurately see the event before that?
Is there a way to do this?
I technically can take the DTStart.Next() and then take the time difference between the two and subtract that from DTStart. But for a rule like
FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=15,-1
this is not reliable, because the number of days between recurrences can be different each time.