DAViCal
RepeatRuleDateTime Class Reference
Inheritance diagram for RepeatRuleDateTime:
Collaboration diagram for RepeatRuleDateTime:

Public Member Functions

 __construct ($date=null, $dtz=null, $is_date=null)
 
 __toString ()
 
 AsDate ()
 
 setAsFloat ()
 
 isFloating ()
 
 isDate ()
 
 setAsDate ()
 
 modify ( $interval)
 
 UTC ($fmt='Ymd\THis\Z')
 
 FloatOrUTC ($return_floating_times=false)
 
 RFC5545 ($return_floating_times=false)
 
 setTimeZone ( $tz)
 
 getTimeZone ()
 
 setDate ( $year=null, $month=null, $day=null)
 
 setYearDay ( $yearday)
 
 year ()
 
 month ()
 
 day ()
 
 hour ()
 
 minute ()
 
 second ()
 
 epoch ()
 

Static Public Member Functions

static withFallbackTzid ( $date, $fallback_tzid)
 
static hasLeapDay ($year)
 
static daysInMonth ( $year, $month)
 

Static Public Attributes

static $Format = 'c'
 

Private Attributes

 $tzid
 
 $is_date
 

Static Private Attributes

static $UTCzone
 

Detailed Description

Wrap the DateTime class to make it friendlier to passing in random strings from iCalendar objects, and especially the random stuff used to identify timezones. We also add some utility methods and stuff too, in order to simplify some of the operations we need to do with dates.

Definition at line 210 of file RRule.php.

Member Function Documentation

◆ daysInMonth()

static RepeatRuleDateTime::daysInMonth (   $year,
  $month 
)
static

Returns the number of days in a year/month pair

Parameters
int$year
int$month
Returns
int the number of days in the month

Definition at line 471 of file RRule.php.

◆ FloatOrUTC()

RepeatRuleDateTime::FloatOrUTC (   $return_floating_times = false)

If this is a localised time then this will return the UTC equivalent. If it is a floating time, then you will just get the floating time. If it is a date then it will be returned as a date. Note that if it is a localised date then the answer will still be the UTC equivalent but only the date itself will be returned.

If return_floating_times is true then all dates will be returned as floating times and UTC will not be returned.

See also
RepeatRuleDateTime::UTC()

Definition at line 406 of file RRule.php.

◆ hasLeapDay()

static RepeatRuleDateTime::hasLeapDay (   $year)
static

Returns a 1 if this year is a leap year, otherwise a 0

Parameters
int$yearThe year we are quizzical about.
Returns
1 if this is a leap year, 0 otherwise

Definition at line 460 of file RRule.php.

◆ RFC5545()

RepeatRuleDateTime::RFC5545 (   $return_floating_times = false)

Returns the string following a property name for an RFC5545 DATE-TIME value.

Definition at line 422 of file RRule.php.

◆ UTC()

RepeatRuleDateTime::UTC (   $fmt = 'Ymd\THis\Z')

Always returns a time localised to UTC. Even floating times are converted to UTC using the server's currently configured PHP timezone. Even dates will include a time, which will be non-zero if they were localised dates.

See also
RepeatRuleDateTime::FloatOrUTC()

Definition at line 379 of file RRule.php.


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