MDL-57658 calendar: Fix rrulemanager and unit tests
authorJun Pataleta <jun@moodle.com>
Thu, 19 Jan 2017 07:22:06 +0000 (15:22 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 9 Mar 2017 08:10:08 +0000 (16:10 +0800)
commit8ddc656739d3f29464fea448afdd313a9321c7b3
tree7e8e745bd8c97b7c065f196004e276ff8dde63cf
parent3c45d26f5802ce07df2c516db5b68cf9d5d99e55
MDL-57658 calendar: Fix rrulemanager and unit tests

Issues fixed:
* Additional rule validations.
* Rewrote recurrence logic.
* Additional unit tests, especially from the examples in the RFC.
* The date format "YmdThis" results into an incorrect date for the
  "UNTIL" parameter. The literal "T" should be escaped, and a literal
  "Z" is also needed at the end of the format string to indicate UTC.
* Implemented handling of negative modifier values for BYxxx rules.
* Implemented handling of BYWEEKNO, BYYEARDAY, BYSETPOS, BYHOUR,
  BYMINUTE, BYSECOND rules.
calendar/classes/rrule_manager.php
calendar/tests/rrule_manager_test.php [new file with mode: 0644]
calendar/tests/rrule_manager_tests.php [deleted file]
lang/en/calendar.php