0

RRULE requires specific information for when timezone changes between standard and daylight time. This information originally comes from the Olson database, and I suspect that it is available in the data property of the NSTimeZone class. But how do I get the structure of this property?

The public methods of NSTimeZone seem insufficient to make a complete RRULE for timezone transitions.

Creating an ical with an RDATE block but not RRULE block results in Exchange complaining of an invalid format.

Any suggestions on how to resolve this?

Victor Engel
  • 2,037
  • 2
  • 25
  • 46

2 Answers2

0

If i am not wrong then you can use code from :https://github.com/FabienDiTore/ios-rrule_parser or https://github.com/jochenschoellig/RRULE-to-EKRecurrenceRule.

Dipen Patel
  • 911
  • 2
  • 9
  • 22
  • Unless I'm not reading that right, that doesn't look like what I'm after. Those seem like ways to parse an RRULE given a rule in some other format. The latter is what I don't know how to get. – Victor Engel Feb 12 '15 at 19:45
0

I ended up creating a method that uses nextDaylightSavingTransitionAfterDate: to find transition dates a year apart (if they exist). Once these are found, an NSDateComponents object is created for each so the dates can be compared to infer a repeat rule. I considered only matches that occurred in the same month, then checked for either same day number of same day of week. If same day of week, I checked the ordinality of the weekday within the month to create the rule.

Victor Engel
  • 2,037
  • 2
  • 25
  • 46