So I've tried to use the RecurrenceRule to google.RRule conversion, but I seem to lose the TimeZone information (on master). Bug in StreamReader? (0.3.3 doesn't have ByDay and other classes, so I cannot use that)
Last edit: Philipp Walther 2014-11-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, so if anyone is interested, I fixed it this way:
io.StreamReader:
//remove the VTIMEZONE components from the iCalendar objectif(toKeep.isEmpty()&&vcalComponent!=null){ical.removeComponents(VTimezone.class);}elseif(!toKeep.isEmpty()){//keep the VTIMEZONE components that don't have IDsical.getComponents().replace(VTimezone.class,toKeep);}
The whole idea behind removing the VTIMEZONE components from the "ICalendar" object is that they are not part of the iCalendar "data-model" per se. They are only needed to let the parser know how to parse each date property value. After the values are parsed in their appropriate timezones, the VTIMEZONEs are not needed. However, you can still access them through the "ICalReader.getTimezoneInfo()" method if you wish.
This is part of the major timezone-related changes I've added to this version, so please let me know if you see anything wrong with this!
I just added a "getDateIterator()" method to the "RecurrenceRule" class, so you don't have to go through all that trouble.
hi all
I'm trying to parse a simple iCal file exported from Google Calendar using this library.
It's 1 Event that has 35 recurrences - I'd expect getRecurrenceDates() to return those dates. Currently I get an empty list.
Do I misunderstand the API or is this work in progress, a malformed file maybe?
My code:
~~~~~~~~
Oh I see now - It seems to need RDATE for that, it doesn't 'solve' RRULE for me. Although I can see there's some (Google) source in there for that..?
So I've tried to use the RecurrenceRule to google.RRule conversion, but I seem to lose the TimeZone information (on master). Bug in StreamReader? (0.3.3 doesn't have ByDay and other classes, so I cannot use that)
Last edit: Philipp Walther 2014-11-22
Ok, so if anyone is interested, I fixed it this way:
io.StreamReader:
and then use the google code to convert:
I made my own copy of IcalTimeZone and changed the convert(..) methods to public so I can access them.
I'm still not sure why 0.3.4 removes/hides the TimeZone information.
Hi Philip,
The whole idea behind removing the VTIMEZONE components from the "ICalendar" object is that they are not part of the iCalendar "data-model" per se. They are only needed to let the parser know how to parse each date property value. After the values are parsed in their appropriate timezones, the VTIMEZONEs are not needed. However, you can still access them through the "ICalReader.getTimezoneInfo()" method if you wish.
This is part of the major timezone-related changes I've added to this version, so please let me know if you see anything wrong with this!
I just added a "getDateIterator()" method to the "RecurrenceRule" class, so you don't have to go through all that trouble.
I will be releasing a new stable version soon, so stay tuned! :D