Page MenuHomePhabricator

Validate various RRULE components and simplify logic slightly
ClosedPublic

Authored by epriestley on Sep 27 2016, 6:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 11:34 PM
Unknown Object (File)
Thu, Nov 14, 8:04 PM
Unknown Object (File)
Tue, Nov 12, 7:58 PM
Unknown Object (File)
Sun, Nov 10, 4:47 PM
Unknown Object (File)
Thu, Nov 7, 2:07 AM
Unknown Object (File)
Sun, Nov 3, 12:44 PM
Unknown Object (File)
Oct 22 2024, 4:00 AM
Unknown Object (File)
Oct 10 2024, 12:01 AM
Subscribers
None

Details

Summary

Ref T10747.

  • Validate that all the values are in the proper ranges (this does not yet implement some rules which take more than one value into account, e.g. BYDAY may not be in the form "+1TU" unless FREQUENCY is MONTHLY or YEARLY).
  • Use constants instead of magic strings.
  • Do array_fuse() mangling earlier.
  • Fix a couple of the TODOs around weekday stuff.
  • Implement (probably) more of the BY* rules.
  • Other minor simplification/cleanup.
Test Plan

Unit tests still pass.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Validate various RRULE components and simplify logic slightly.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
src/parser/calendar/data/PhutilCalendarRecurrenceRule.php
560

The "SCALE" stuff is mostly to clean up these huge X || Y || Z conditions -- this is the worst one.

853

Just changed this to make it a little more human-readable.

chad edited edge metadata.
This revision is now accepted and ready to land.Sep 27 2016, 9:03 PM
This revision was automatically updated to reflect the committed changes.