开发者

Library for working with recurrence rules in Objective C?

开发者 https://www.devze.com 2023-02-06 16:57 出处:网络
I\'d like to do some reasoning about recurrence rules in an Objective C application (targetted at iOS currently). I\'d like to do things like work out when the next occurrence of a particular event is

I'd like to do some reasoning about recurrence rules in an Objective C application (targetted at iOS currently). I'd like to do things like work out when the next occurrence of a particular event is from a given point, or whether a particular date & time falls within a given rule.

Previously I've written such code in python with the dateutil rrule module, which works quite nicely, but haven't yet found a nice Objective C equivalent. There is a class in the Calendar Framework that sounds like it'd be useful, CalRecurrenceRule, but there doesn't seem to be any way to reason about the objects it produces, so is of no help.

Having written lots of time code in python, I know that getting it right is hard, so I'd like to avoid writing recurrence logic myself, so if anyone can recommend a library that might do what I want that can be used in an iOS application, that'd be much appreciat开发者_如何转开发ed.

-- Michael


CalRecurrenceRule is a class that exists on the Mac as part of the CalendarStore framework. It does not exist on iOS. The iOS equivalent is the EventKit framework, which has its own EKRecurrenceRule class. What are you wanting to do with these recurrence rules?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号