Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove an event #125

Closed
Fsero opened this issue Jan 27, 2014 · 3 comments
Closed

Remove an event #125

Fsero opened this issue Jan 27, 2014 · 3 comments
Labels

Comments

@Fsero
Copy link

Fsero commented Jan 27, 2014

Hi there,

i'm using icalendar for parse some ics and manipulate some events, looking in the API i did not see a proper method to remove an event, i could clone the old calendar and then insert the non removed events but it's an awful way to do it.

is there another method that i could use?

Thanks in advance.

@EtienneM
Copy link

Hi!

I am also looking for a method to delete events from a calendar. Any new possibility with the newer version? Or any tips to do so?

@untitaker
Copy link
Contributor

You have the subcomponents list on each component which you can just modify.

@untitaker untitaker added the doc label Dec 16, 2015
@EtienneM
Copy link

Thanks!

For those who wonder how it works, here is a minimal working example:

vcalendar.subcomponents[:] = [comp for comp in vcalendar.subcomponents if my_comps(comp)]

with my_comps a function that return true depending on some condition on the component comp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants