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)
Wed, Apr 24, 10:45 PM
Unknown Object (File)
Fri, Apr 19, 5:21 PM
Unknown Object (File)
Mon, Apr 8, 2:35 PM
Unknown Object (File)
Sat, Apr 6, 9:11 AM
Unknown Object (File)
Fri, Apr 5, 2:57 AM
Unknown Object (File)
Tue, Apr 2, 8:41 AM
Unknown Object (File)
Mar 26 2024, 6:28 PM
Unknown Object (File)
Mar 26 2024, 5:55 PM
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.