DAViCal
Loading...
Searching...
No Matches
RepeatRuleDateRange Class Reference

Public Member Functions

 __construct ( $date1, $date2)
 
 overlaps (RepeatRuleDateRange $other)
 
 getDuration ()
 

Public Attributes

 $from
 
 $until
 

Detailed Description

This class is used to hold a pair of dates defining a range. The range may be open-ended by including a null for one end or the other, or both.

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

Definition at line 547 of file RRule.php.

Constructor & Destructor Documentation

◆ __construct()

RepeatRuleDateRange::__construct (   $date1,
  $date2 
)

Construct a new RepeatRuleDateRange which will be the range between $date1 and $date2. The earliest of the two dates will be used as the start of the period, the latest as the end. If one of the dates is null then the order of the parameters is significant, with the null treated as -infinity if it is first, or +infinity if it is second. If both parameters are null then the range is from -infinity to +infinity.

Parameters
RepeatRuleDateTime$date1
RepeatRuleDateTime$date2

Definition at line 560 of file RRule.php.

Member Function Documentation

◆ getDuration()

RepeatRuleDateRange::getDuration ( )

Get an Rfc5545Duration from this date range. If the from date is null it will be null. If the until date is null the duration will either be 1 day (if the from is a date) or 0 otherwise.

Returns
NULL|Rfc5545Duration

Definition at line 595 of file RRule.php.

◆ overlaps()

RepeatRuleDateRange::overlaps ( RepeatRuleDateRange  $other)

Assess whether this range overlaps the supplied range. null values are treated as infinity.

Parameters
RepeatRuleDateRange$other
Returns
boolean

Definition at line 576 of file RRule.php.

Member Data Documentation

◆ $from

RepeatRuleDateRange::$from

Definition at line 548 of file RRule.php.

◆ $until

RepeatRuleDateRange::$until

Definition at line 549 of file RRule.php.


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