mirror of
https://github.com/rlanvin/php-rrule.git
synced 2025-02-20 09:54:16 +01:00
VALUE is a valid param of EXDATE (#62)
EXDATE rule like 'EXDATE;VALUE=DATE-TIME:20171227T200000Z' Are valid according to the rfc but rejected because VALUE param is not recognized.
This commit is contained in:
parent
9fd853882c
commit
37873779e4
@ -278,6 +278,9 @@ class RfcParser
|
||||
$tz = null;
|
||||
foreach ( $property['params'] as $name => $value ) {
|
||||
switch ( strtoupper($name) ) {
|
||||
case 'VALUE':
|
||||
// Ignore optional words
|
||||
break;
|
||||
case 'TZID':
|
||||
$tz = new \DateTimeZone($value);
|
||||
break;
|
||||
|
@ -520,7 +520,16 @@ class RSetTest extends TestCase
|
||||
date_create('1997-09-02 09:00:00', new \DateTimeZone('America/New_York')),
|
||||
date_create('1997-09-04 09:00:00', new \DateTimeZone('America/New_York'))
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
"EXDATE;VALUE=DATE-TIME:20171227T200000Z
|
||||
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=-1WE;UNTIL=20180131T200000Z
|
||||
DTSTART:20171129T200000Z",
|
||||
array(
|
||||
date_create('2017-11-29 20:00:00', new \DateTimeZone('GMT')),
|
||||
date_create('2018-01-31 20:00:00', new \DateTimeZone('GMT'))
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user