Page MenuHomePhabricator

Add initial support for complex recurring events
ClosedPublic

Authored by epriestley on Sep 23 2016, 6:56 PM.
Tags
None
Referenced Files
F13282417: D16590.diff
Sun, Jun 2, 12:03 PM
F13270355: D16590.diff
Wed, May 29, 9:32 AM
F13256536: D16590.diff
Sat, May 25, 1:48 PM
F13230831: D16590.diff
Mon, May 20, 11:20 PM
F13229759: D16590.id39937.diff
Mon, May 20, 7:01 PM
F13229420: D16590.id39937.diff
Mon, May 20, 4:23 PM
F13210190: D16590.id39941.diff
Fri, May 17, 4:29 AM
F13206821: D16590.diff
Wed, May 15, 6:10 PM
Subscribers
None

Details

Summary

Ref T10747. In .ics files, event recurrence can be defined in three ways:

  • RDATE, a list of specific dates when the event occurs.
  • EXDATE, a list of specific dates when the event does not occur. This is the opposite of RDATE.
  • RRULE, a complex description of recurrence rules, like "Every other Monday in April and March".

We currently use a simpler recurrence approach internally, but I plan to implement (nearly) full-power RRULE-like recurrence and use that as the internal recurrence engine, then just expose a simpler UI (this is similar to what other applications do).

To start with, define everything except the RRULE stuff, since that's much harder:

  • A Source is something that can generate recurring dates.
    • A List is a source with specific dates (RDATE or EXDATE).
    • A Rule is a source which implmenets RRULE behavior. This change has a skeleton, but no code.
  • A Set is a collection of sources (e.g., zero or more sources, often zero or one RDATE, zero or one EXDATE, and zero or one RRULE).

Basically, this gets all the support code in place to actually write RRULE stuff, but doesn't actually implement it yet.

Test Plan

Unit tests.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Add initial support for complex recurring events.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
chad added inline comments.
src/parser/calendar/data/PhutilCalendarRecurrenceRule.php
11

^ - ^

This revision is now accepted and ready to land.Sep 23 2016, 7:25 PM

Yeah -- I'm not going to let users create secondly events, but we'll parse them and then say "no way buddy".

This revision was automatically updated to reflect the committed changes.