tkokasih / google-rfc-2445

Automatically exported from code.google.com/p/google-rfc-2445
Apache License 2.0
0 stars 0 forks source link

GCalendar Recurrence string throws exception in RRule instantiation. #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a calendar entry in your google calendar with a never ending daily 
recurrence rule for each day.
2. Get the event data via the gdata.java-1.41.5 library and create a new RRule 
with the recurrence string of the created event.

What is the expected output? What do you see instead?
Expected: A RRule instance.

Here is my recurrence rule string:

DTSTART;TZID=Europe/Zurich:20100930T183000
DTEND;TZID=Europe/Zurich:20100930T193000
RRULE:FREQ=DAILY;UNTIL=20101005T163000Z
BEGIN:VTIMEZONE
TZID:Europe/Zurich
X-LIC-LOCATION:Europe/Zurich
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE

And here the thrown exception:

java.text.ParseException: cannot parse content line 
[[DTSTART;TZID=Europe/Zurich:20100930T183000
DTEND;TZID=Europe/Zurich:20100930T193000
RRULE:FREQ=DAILY
BEGIN:VTIMEZONE
TZID:Europe/Zurich
X-LIC-LOCATION:Europe/Zurich
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE]] in []
    at com.google.ical.values.IcalSchema.badContent(IcalSchema.java:164)
    at com.google.ical.values.AbstractIcalObject.parse(AbstractIcalObject.java:58)
    at com.google.ical.values.RRule.<init>(RRule.java:52)

What version of the product are you using? On what operating system?
I checked out the sources yesterday.

Original issue reported on code.google.com by goo...@canoo.com on 1 Oct 2010 at 8:36

GoogleCodeExporter commented 8 years ago
This library is intended to parse only recurrence rules and not complete 
vCalendar texts.
In this case, you should call RRule's constructor with: 
"RRULE:FREQ=DAILY;UNTIL=20101005T163000Z" 

Original comment by luc.cl...@gmail.com on 30 Dec 2010 at 12:17