Final tweaks to RRule, removing debugging and with tests that are now better.

This commit is contained in:
Andrew McMillan 2007-03-07 22:12:39 +13:00
parent bc15ec03e6
commit 48f43b18b3
7 changed files with 12 additions and 7 deletions

View File

@ -713,6 +713,9 @@ class RRule {
if ( substr($this->_rule, 0, 6) == 'RRULE:' ) {
$this->_rule = substr($this->_rule, 6);
}
dbg_error_log( "RRule", " new RRule: Start: %s, RRULE: %s", $start->Render(), $this->_rule );
$parts = split(';',$this->_rule);
$this->_part = array();
foreach( $parts AS $k => $v ) {

View File

@ -23,7 +23,7 @@ $tests = array(
foreach( $tests AS $start => $rrule ) {
echo "$start - $rrule\n";
$rule = new RRule( $start, $rrule );
$rule = new RRule( new iCalDate($start), $rrule );
$i = 0;
do {
if ( ($i % 4) == 0 ) echo "\n";

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 958
Content-Length: 928
Content-Type: text/calendar
BEGIN:VCALENDAR
@ -12,7 +12,6 @@ DTSTART:20061004T140000Z
DTEND:20070105T220000Z
FREEBUSY;FBTYPE=BUSY-TENTATIVE:20061223T060000/PT2H
FREEBUSY:20061031T210000/PT1H
FREEBUSY:20061101T210000/PT1H
FREEBUSY:20061102T210000/PT1H
FREEBUSY:20061109T210000/PT1H
FREEBUSY:20061116T210000/PT1H

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 1892
Content-Length: 1922
Content-Type: text/calendar
BEGIN:VCALENDAR
@ -37,6 +37,7 @@ FREEBUSY:20070329T210000/PT1H
FREEBUSY:20070405T210000/PT1H
FREEBUSY:20070412T210000/PT1H
FREEBUSY:20070419T210000/PT1H
FREEBUSY:20070426T210000/PT1H
FREEBUSY:20061101T233000/PT1H
FREEBUSY:20061202T183000/PT2H
FREEBUSY:20070102T183000/PT2H

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 1892
Content-Length: 1922
Content-Type: text/calendar
BEGIN:VCALENDAR
@ -37,6 +37,7 @@ FREEBUSY:20070329T210000/PT1H
FREEBUSY:20070405T210000/PT1H
FREEBUSY:20070412T210000/PT1H
FREEBUSY:20070419T210000/PT1H
FREEBUSY:20070426T210000/PT1H
FREEBUSY:20061101T233000/PT1H
FREEBUSY:20061202T183000/PT2H
FREEBUSY:20070102T183000/PT2H

View File

@ -12,7 +12,6 @@ DTSTART:20061001T000000Z
DTEND:20070630T235959Z
FREEBUSY;FBTYPE=BUSY-TENTATIVE:20061223T060000/PT2H
FREEBUSY:20061031T210000/PT1H
FREEBUSY:20061101T210000/PT1H
FREEBUSY:20061102T210000/PT1H
FREEBUSY:20061109T210000/PT1H
FREEBUSY:20061116T210000/PT1H
@ -38,6 +37,7 @@ FREEBUSY:20070329T210000/PT1H
FREEBUSY:20070405T210000/PT1H
FREEBUSY:20070412T210000/PT1H
FREEBUSY:20070419T210000/PT1H
FREEBUSY:20070426T210000/PT1H
FREEBUSY:20061101T233000/PT1H
FREEBUSY:20061102T183000/PT2H
FREEBUSY:20061202T183000/PT2H

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 1862
Content-Length: 1892
Content-Type: text/calendar
BEGIN:VCALENDAR
@ -37,6 +37,7 @@ FREEBUSY:20070329T210000/PT1H
FREEBUSY:20070405T210000/PT1H
FREEBUSY:20070412T210000/PT1H
FREEBUSY:20070419T210000/PT1H
FREEBUSY:20070426T210000/PT1H
FREEBUSY:20061101T233000/PT1H
FREEBUSY:20061202T183000/PT2H
FREEBUSY:20070102T183000/PT2H