RDateIterator
RRuleParser.
This class receives an RRULE string, and allows you to iterate to get a list of dates in that recurrence.
For instance, passing: FREQ=DAILY;LIMIT=5 will cause the iterator to contain 5 items, one for each day.
- Full name:
\Sabre\VObject\Recur\RDateIterator
- This class implements:
\Iterator
Properties
startDate
The reference start date/time for the rrule.
All calculations are based on this initial date.
currentDate
The date of the current iteration. You can get this by calling ->current().
counter
The current item in the list.
You can get this number with the key() method.
dates
Array with the RRULE dates.
Methods
__construct
Creates the Iterator.
Parameters:
Parameter | Type | Description |
---|---|---|
$rrule |
string|array | |
$start |
\DateTimeInterface |
current
key
Returns the current item number.
valid
Returns whether the current item is a valid item for the recurrence iterator.
rewind
Resets the iterator.
next
Goes on to the next iteration.
isInfinite
Returns true if this recurring event never ends.
fastForward
This method allows you to quickly go to the next occurrence after the specified date.
Parameters:
Parameter | Type | Description |
---|---|---|
$dt |
\DateTimeInterface |
parseRDate
This method receives a string from an RRULE property, and populates this class with all the values.
Parameters:
Parameter | Type | Description |
---|---|---|
$rdate |
mixed |
Automatically generated on 2025-03-18