Open natashamm opened 1 year ago
Hi, thanks for posting! This sounds interesting..
I think about it in the terms of testing: A lot of the tests can run on your code, too to make sure it is working.
1) This was not discussed before here to my knowledge. 3) You can not see it because it is not there. I think, you miss having it, though :) 2) I am happy to support you on this and you can integrate it. You can also choose to fork or reuse code under the license. From a user perspective, it makes sense, to be able to choose the return value: list or calendar.
Thinking about it this way, the strategy pattern comes to my mind: This strategy object is the choice between list generation and calendar. This would also path the way towards solving #103 and #90 from my perspective.
For me, TDD is important but you do not have to do it. If your code is tested 100% though, other people will not break it in the future and provide fixes to the little bits we missed.
What do you think?
Hi thanks for your feedback/input.
That sounds good, I will leave updates in the thread when I have something more to share!
I might be slow but still, you can let me know. You can also create a PR as soon as you have just a little code, so I can have a look.
I just wondered: This could be called constrain(start, stop=None)
.
The easiest implementation I would think of is this one:
There is a case to consider for edited events.
Ok, to make it a valid RFC5545 calendar that can be exported as an ICS file that also allows all the events of one type to actually show up as related (same UID), I propose this:
constrain(start, stop)
that returns an icalendar.Calendar
.between()
to get all the events.This seems to be a start for an algorithm.
Another one would be to modify RRULE and RDATE. For that, one might need to dig a bit deeper into the code.
Instead of returning a list of events like
recurring_ical_events.of(an_icalendar_object).between(
day 1,
day 2)
, return the original icalendar_object with all the events outside of past, future removed.That would mean for a VEVENT with an RRULE that has some events taking place outside of
day 1
-day 2
, modifying the RRULE.I might be interested in working on this too.. I just also wanted to start a discussion to get your expertise and input to see if 1) this is something that has already been attempted before, 2) if this even something that this library would want to support, and 3) maybe this functionality exists and I am missing it!
Thanks!
We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work.