@@ 23-25 (lines=3) @@ | ||
20 | } |
|
21 | } |
|
22 | ||
23 | if(preg_match('/' . $this::RRULE_PARAMETER . '=([0-9]{8}T[0-9]{6}Z)/', $rRule, $matches)) { |
|
24 | return \DateTime::createFromFormat('Ymd\THisZ', $matches[1], new \DateTimeZone('UTC')); |
|
25 | } |
|
26 | ||
27 | if(preg_match('/' . $this::RRULE_PARAMETER . '=([0-9]{8}T[0-9]{6})/', $rRule, $matches)) { |
|
28 | return \DateTime::createFromFormat('Ymd\THis', $matches[1]); |
|
@@ 27-29 (lines=3) @@ | ||
24 | return \DateTime::createFromFormat('Ymd\THisZ', $matches[1], new \DateTimeZone('UTC')); |
|
25 | } |
|
26 | ||
27 | if(preg_match('/' . $this::RRULE_PARAMETER . '=([0-9]{8}T[0-9]{6})/', $rRule, $matches)) { |
|
28 | return \DateTime::createFromFormat('Ymd\THis', $matches[1]); |
|
29 | } |
|
30 | ||
31 | if(preg_match('/' . $this::RRULE_PARAMETER . '=([0-9]{8})/', $rRule, $matches)) { |
|
32 | return \DateTime::createFromFormat('Ymd', $matches[1]); |
|
@@ 31-33 (lines=3) @@ | ||
28 | return \DateTime::createFromFormat('Ymd\THis', $matches[1]); |
|
29 | } |
|
30 | ||
31 | if(preg_match('/' . $this::RRULE_PARAMETER . '=([0-9]{8})/', $rRule, $matches)) { |
|
32 | return \DateTime::createFromFormat('Ymd', $matches[1]); |
|
33 | } |
|
34 | ||
35 | if(preg_match('/' . $this::RRULE_PARAMETER . '/', $rRule, $matches)) { |
|
36 | throw new \InvalidArgumentException(sprintf('Invalid RRULE [%s]', $this::RRULE_PARAMETER)); |