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, Dec 11, 5:47 AM
Unknown Object (File)
Tue, Dec 10, 3:02 PM
Unknown Object (File)
Mon, Dec 9, 4:46 PM
Unknown Object (File)
Nov 22 2024, 6:15 AM
Unknown Object (File)
Nov 18 2024, 11:34 PM
Unknown Object (File)
Nov 14 2024, 8:04 PM
Unknown Object (File)
Nov 12 2024, 7:58 PM
Unknown Object (File)
Nov 10 2024, 4:47 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.