Class Horde_Date_Recurrence

Description

The Horde_Date_Recurrence class implements algorithms for calculating recurrences of events, including several recurrence types, intervals, exceptions, and conversion from and to vCalendar and iCalendar recurrence rules.

All methods expecting dates as parameters accept all values that the Horde_Date constructor accepts, i.e. a timestamp, another Horde_Date object, an ISO time string or a hash.

Located in /Date/Date/Recurrence.php (line 53)


	
			
Variable Summary
Method Summary
 Horde_Date_Recurrence Horde_Date_Recurrence (Horde_Date $start)
 void addCompletion (integer $year, integer $month, integer $mday)
 void addException (integer $year, integer $month, integer $mday)
 void deleteCompletion (integer $year, integer $month, integer $mday)
 void deleteException (integer $year, integer $month, integer $mday)
 boolean fromHash (array $hash)
 void fromRRule10 (string $rrule)
 void fromRRule20 (string $rrule)
 array getCompletions ()
 array getExceptions ()
 integer getRecurCount ()
 integer getRecurInterval ()
 string getRecurName ()
 integer getRecurOnDays ()
 integer getRecurType ()
 boolean hasActiveRecurrence ()
 boolean hasCompletion (integer $year, integer $month, integer $mday)
 boolean hasException (integer $year, integer $month, integer $mday)
 boolean hasRecurCount ()
 boolean hasRecurEnd ()
 boolean hasRecurType (integer $recurrence)
 Horde_Date|boolean nextRecurrence (Horde_Date $afterDate)
 boolean recurOnDay (integer $dayMask)
 void setRecurCount (integer $count)
 void setRecurEnd (Horde_Date $end)
 void setRecurInterval (integer $interval)
 void setRecurOnDay (integer $dayMask)
 void setRecurStart (Horde_Date $start)
 void setRecurType (integer $recurrence)
 array toHash ()
 string toRRule10 (Horde_iCalendar $calendar)
 string toRRule20 (Horde_iCalendar $calendar)
Variables
array $completions = array() (line 110)

All the dates this recurrence has been marked as completed.

array $exceptions = array() (line 103)

All the exceptions from recurrence for this event.

integer $recurCount = null (line 74)

The number of recurrences.

integer $recurData = null (line 96)

Any additional recurrence data.

Horde_Date $recurEnd = null (line 67)

The end date of the recurrence interval.

integer $recurInterval = 1 (line 89)

The length of time between recurrences. The time unit depends on the recurrence type.

integer $recurType = HORDE_DATE_RECUR_NONE (line 81)

The type of recurrence this event follows. HORDE_DATE_RECUR_* constant.

Horde_Date $start (line 60)

The start time of the event.

Methods
Constructor Horde_Date_Recurrence (line 117)

Constructor.

Horde_Date_Recurrence Horde_Date_Recurrence (Horde_Date $start)
  • Horde_Date $start: Start of the recurring event.
addCompletion (line 798)

Adds a completion to a recurring event.

void addCompletion (integer $year, integer $month, integer $mday)
  • integer $year: The year of the execption.
  • integer $month: The month of the execption.
  • integer $mday: The day of the month of the completion.
addException (line 745)

Adds an exception to a recurring event.

void addException (integer $year, integer $month, integer $mday)
  • integer $year: The year of the execption.
  • integer $month: The month of the execption.
  • integer $mday: The day of the month of the exception.
deleteCompletion (line 810)

Deletes a completion from a recurring event.

void deleteCompletion (integer $year, integer $month, integer $mday)
  • integer $year: The year of the execption.
  • integer $month: The month of the execption.
  • integer $mday: The day of the month of the completion.
deleteException (line 757)

Deletes an exception from a recurring event.

void deleteException (integer $year, integer $month, integer $mday)
  • integer $year: The year of the execption.
  • integer $month: The month of the execption.
  • integer $mday: The day of the month of the exception.
fromHash (line 1186)

Parses the recurrence data from a hash.

  • return: True if the hash seemed valid, false otherwise.
boolean fromHash (array $hash)
  • array $hash: The hash to convert.
fromRRule10 (line 852)

Parses a vCalendar 1.0 recurrence rule.

void fromRRule10 (string $rrule)
  • string $rrule: A vCalendar 1.0 conform RRULE value.
fromRRule20 (line 1010)

Parses an iCalendar 2.0 recurrence rule.

void fromRRule20 (string $rrule)
  • string $rrule: An iCalendar 2.0 conform RRULE value.
getCompletions (line 839)

Retrieves all the completions for this event.

  • return: Array containing the dates of all the completions in YYYYMMDD form.
array getCompletions ()
getExceptions (line 786)

Retrieves all the exceptions for this event.

  • return: Array containing the dates of all the exceptions in YYYYMMDD form.
array getExceptions ()
getRecurCount (line 252)

Retrieves the number of recurrences of this event.

  • return: The number recurrences.
integer getRecurCount ()
getRecurEnd (line 306)

Retrieves the end date of the recurrence interval.

  • return: The recurrence end.
Horde_Date getRecurEnd ()
getRecurInterval (line 226)

Retrieves the length of time between recurrences of this event.

  • return: The number of seconds between recurrences.
integer getRecurInterval ()
getRecurName (line 195)

Returns a description of this event's recurring type.

  • return: Human readable recurring type.
string getRecurName ()
getRecurOnDays (line 152)

Returns the days this event recurs on.

  • return: A mask consisting of HORDE_DATE_MASK_* constants specifying the day(s) this event recurs on.
integer getRecurOnDays ()
getRecurStart (line 282)

Retrieves the start date of the recurrence interval.

  • return: The recurrence start.
Horde_Date getRecurStart ()
getRecurType (line 185)

Returns recurrence type of this event.

  • return: A HORDE_DATE_RECUR_* constant.
integer getRecurType ()
hasActiveRecurrence (line 689)

Returns whether this event has any date that matches the recurrence rules and is not an exception.

  • return: True if an active recurrence exists.
boolean hasActiveRecurrence ()
hasCompletion (line 827)

Checks if a completion exists for a given reccurence of an event.

  • return: True if a completion exists for the given date.
boolean hasCompletion (integer $year, integer $month, integer $mday)
  • integer $year: The year of the reucrance.
  • integer $month: The month of the recurrance.
  • integer $mday: The day of the month of the recurrance.
hasException (line 774)

Checks if an exception exists for a given reccurence of an event.

  • return: True if an exception exists for the given date.
boolean hasException (integer $year, integer $month, integer $mday)
  • integer $year: The year of the reucrance.
  • integer $month: The month of the reucrance.
  • integer $mday: The day of the month of the reucrance.
hasRecurCount (line 262)

Returns whether this event has a recurrence with a fixed count.

  • return: True if this recurrence has a fixed count.
boolean hasRecurCount ()
hasRecurEnd (line 316)

Returns whether this event has a recurrence end.

  • return: True if this recurrence ends.
boolean hasRecurEnd ()
hasRecurType (line 165)

Returns whether this event has a specific recurrence type.

  • return: True if the event has the specified recurrence type.
boolean hasRecurType (integer $recurrence)
  • integer $recurrence: HORDE_DATE_RECUR_* constant of the recurrence type to check for.
nextActiveRecurrence (line 723)

Returns the next active recurrence.

  • return: The date of the next active recurrence or false if the event has no active recurrence after $afterDate.
Horde_Date|boolean nextActiveRecurrence (Horde_Date $afterDate)
  • Horde_Date $afterDate: Return events after this date.
nextRecurrence (line 331)

Finds the next recurrence of this event that's after $afterDate.

  • return: The date of the next recurrence or false if the event does not recur after $afterDate.
Horde_Date|boolean nextRecurrence (Horde_Date $afterDate)
  • Horde_Date $afterDate: Return events after this date.
recurOnDay (line 130)

Checks if this event recurs on a given day of the week.

  • return: True if this event recurs on the given day(s).
boolean recurOnDay (integer $dayMask)
  • integer $dayMask: A mask consisting of HORDE_DATE_MASK_* constants specifying the day(s) to check.
setRecurCount (line 236)

Sets the number of recurrences of this event.

void setRecurCount (integer $count)
  • integer $count: The number of recurrences.
setRecurEnd (line 292)

Sets the end date of the recurrence interval.

void setRecurEnd (Horde_Date $end)
setRecurInterval (line 214)

Sets the length of time between recurrences of this event.

void setRecurInterval (integer $interval)
  • integer $interval: The time between recurrences.
setRecurOnDay (line 141)

Specifies the days this event recurs on.

void setRecurOnDay (integer $dayMask)
  • integer $dayMask: A mask consisting of HORDE_DATE_MASK_* constants specifying the day(s) to recur on.
setRecurStart (line 272)

Sets the start date of the recurrence interval.

void setRecurStart (Horde_Date $start)
setRecurType (line 175)

Sets a recurrence type for this event.

void setRecurType (integer $recurrence)
  • integer $recurrence: A HORDE_DATE_RECUR_* constant.
toHash (line 1397)

Export this object into a hash.

  • return: The recurrence hash.
array toHash ()
toRRule10 (line 946)

Creates a vCalendar 1.0 recurrence rule.

string toRRule10 (Horde_iCalendar $calendar)
toRRule20 (line 1106)

Creates an iCalendar 2.0 recurrence rule.

string toRRule20 (Horde_iCalendar $calendar)

Documentation generated on Sun, 30 Jan 2011 05:20:47 +0000 by phpDocumentor 1.4.3