Cyclic events with RRULE from google-rfc-2445

164 Views Asked by At

I wondering if it would be possible to represent cyclic events using RRULE from google rfc 2445. An example would be birth control pills, which follow a cycle of X days of intake, then Y days of rest, and back to start.

Any help would be appreciated!

1

There are 1 best solutions below

1
On

warning: I never used the google library.

From the the newer standard RFC: RFC5545, or also from the old one RFC2445, on which the Google library is built, the best way would be to have a recurence rule (RRULE) with a daily interval (FREQ=DAILY) and then set an interval of x+y days (say x+y=30 INTERVAL=30)and a duration of x days (DTEND x days later than DTSTART)

DTSTART:20151101 DTEND:20151120 RRULE:FREQ=DAILY;INTERVAL=30;