DAViCal
RepeatRule Class Reference

Public Member Functions

 __construct ( $basedate, $rrule, $is_date=null, $return_floating_times=false)
 
 hasLimitedOccurrences ()
 
 set_timezone ( $tzstring)
 
 Start ($return_floating_times=false)
 
 rewind ()
 
 next ($return_floating_times=false)
 
 current ($return_floating_times=false)
 
 key ($return_floating_times=false)
 
 valid ()
 

Static Public Member Functions

static rrule_day_number ( $day)
 
static date_mask ( $date, $y, $mo, $d, $h, $mi, $s)
 

Private Member Functions

 GetMoreInstances ($return_floating_times=false)
 
 expand_bymonth ()
 
 expand_bymonthday ()
 
 expand_byyearday ()
 
 expand_byday_in_week ( $day_in_week)
 
 expand_byday_in_month ( $day_in_month)
 
 expand_byday_in_year ( $day_in_year)
 
 expand_byday ()
 
 expand_byhour ()
 
 expand_byminute ()
 
 expand_bysecond ()
 
 limit_generally ( $fmt_char, $element_name)
 
 limit_byday ()
 
 limit_bymonth ()
 
 limit_byyearday ()
 
 limit_bymonthday ()
 
 limit_byhour ()
 
 limit_byminute ()
 
 limit_bysecond ()
 
 limit_bysetpos ()
 

Static Private Member Functions

static rrule_expand_limit ( $freq)
 

Private Attributes

 $base
 
 $until
 
 $freq
 
 $count
 
 $interval
 
 $bysecond
 
 $byminute
 
 $byhour
 
 $bymonthday
 
 $byyearday
 
 $byweekno
 
 $byday
 
 $bymonth
 
 $bysetpos
 
 $wkst
 
 $instances
 
 $position
 
 $finished
 
 $current_base
 
 $original_rule
 

Detailed Description

This class is an implementation of RRULE parsing and expansion, as per RFC5545. It should be reasonably complete, except that it does not handle changing the WKST - there may be a few errors in unusual rules also, but all of the common cases should be handled correctly.

Author
Andrew McMillan andre.nosp@m.w@mc.nosp@m.milla.nosp@m.n.ne.nosp@m.t.nz

Definition at line 596 of file RRule.php.

Constructor & Destructor Documentation

◆ __construct()

RepeatRule::__construct (   $basedate,
  $rrule,
  $is_date = null,
  $return_floating_times = false 
)

need to handle the error, but FREQ is mandatory so unlikely

Definition at line 621 of file RRule.php.

Member Function Documentation

◆ expand_byday()

RepeatRule::expand_byday ( )
private

Per RFC5545 3.3.10 from note 1&2 to table

Definition at line 993 of file RRule.php.

◆ expand_byday_in_week()

RepeatRule::expand_byday_in_week (   $day_in_week)
private
Todo:
This should really allow for WKST, since if we start a series on (eg.) TH and interval > 1, a MO, TU, FR repeat will not be in the same week with this code.

Definition at line 891 of file RRule.php.

◆ hasLimitedOccurrences()

RepeatRule::hasLimitedOccurrences ( )

If this repeat rule has an UNTIL= or COUNT= then we can know it will end. Eventually.

Returns
boolean Whether or not one of these properties is present.

Definition at line 674 of file RRule.php.

◆ next()

RepeatRule::next (   $return_floating_times = false)

Return the next date in the repeating series.

Parameters
boolean$return_floating_timesWhether to return dates as floating times.
Returns
vComponent The next instance.

Definition at line 702 of file RRule.php.

◆ rrule_expand_limit()

static RepeatRule::rrule_expand_limit (   $freq)
staticprivate

This function returns an array which lists the order of processing, and whether the processing is to expand or limit based on this component.

Note that yearly-byday and monthly-byday have special handling which is coded within the expand_byday() method

Parameters
$freqa string indicating the frequency.

Definition at line 741 of file RRule.php.


The documentation for this class was generated from the following file: