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

fix double WEEKLY string in to_ical result #157

Conversation

pawelnguyen
Copy link

Hello :)

I was trying to generate iCal format from schedule which I earlier loaded from yaml. I stumbled across FREQ=WEEKLY,WEEKLY results from to_ical. They are incompatible with google calendar to which I tried to import my calendar, and probably with RFC (I didn't check that).
After a bit of digging I found that WeeklyRule has doubled interval values which happens while loading yaml. I wrote a test and fixed it, let me know if it needs refactoring :)

@pawelnguyen
Copy link
Author

not sure if description is understandable, to reproduce the problem:

schedule = Schedule.new
schedule.add_recurrence_rule WeeklyRule.new
schedule2 = Schedule.from_yaml(schedule.to_yaml)
p schedule.to_ical
#"DTSTART;TZID=CET:20130329T154100\nRRULE:FREQ=WEEKLY"
p schedule2.to_ical
#"DTSTART;TZID=CET:20130329T154100\nRRULE:FREQ=WEEKLY,WEEKLY" 

@avit
Copy link
Collaborator

avit commented Apr 2, 2013

Thanks @pawelnguyen, I'll have a look and see about merging this into a release this week.

@aaroncraigongithub
Copy link

I'm having the same problem.
A simpler test case is:

rule = Rule.weekly
rule.to_ical
# "FREQ=WEEKLY"
rule.interval(3)
rule.to_ical
# "FREQ=WEEKLY,WEEKLY;INTERVAL=3;WKST=SU"

@avit
Copy link
Collaborator

avit commented May 17, 2013

The problem here looks like the same as #158. I've addressed them both together.

@avit avit closed this in d4d857c May 17, 2013
rlivsey pushed a commit to rlivsey/ice_cube that referenced this pull request Jun 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants