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.

Constructor & Destructor Documentation

◆ __construct()

RepeatRuleDateTime::__construct (   $date = null,
  $dtz = null,
  $is_date = null 
)

Definition at line 217 of file RRule.php.

Member Function Documentation

◆ __toString()

RepeatRuleDateTime::__toString ( )

Definition at line 326 of file RRule.php.

◆ AsDate()

RepeatRuleDateTime::AsDate ( )

Definition at line 331 of file RRule.php.

◆ day()

RepeatRuleDateTime::day ( )

Definition at line 519 of file RRule.php.

◆ 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 477 of file RRule.php.

◆ epoch()

RepeatRuleDateTime::epoch ( )

Definition at line 535 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 410 of file RRule.php.

◆ getTimeZone()

RepeatRuleDateTime::getTimeZone ( )

Definition at line 456 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 466 of file RRule.php.

◆ hour()

RepeatRuleDateTime::hour ( )

Definition at line 523 of file RRule.php.

◆ isDate()

RepeatRuleDateTime::isDate ( )

Definition at line 345 of file RRule.php.

◆ isFloating()

RepeatRuleDateTime::isFloating ( )

Definition at line 341 of file RRule.php.

◆ minute()

RepeatRuleDateTime::minute ( )

Definition at line 527 of file RRule.php.

◆ modify()

RepeatRuleDateTime::modify (   $interval)

Definition at line 356 of file RRule.php.

◆ month()

RepeatRuleDateTime::month ( )

Definition at line 515 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 426 of file RRule.php.

◆ second()

RepeatRuleDateTime::second ( )

Definition at line 531 of file RRule.php.

◆ setAsDate()

RepeatRuleDateTime::setAsDate ( )

Definition at line 350 of file RRule.php.

◆ setAsFloat()

RepeatRuleDateTime::setAsFloat ( )

Definition at line 336 of file RRule.php.

◆ setDate()

RepeatRuleDateTime::setDate (   $year = null,
  $month = null,
  $day = null 
)

Definition at line 485 of file RRule.php.

◆ setTimeZone()

RepeatRuleDateTime::setTimeZone (   $tz)

Definition at line 445 of file RRule.php.

◆ setYearDay()

RepeatRuleDateTime::setYearDay (   $yearday)

Definition at line 496 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 383 of file RRule.php.

◆ withFallbackTzid()

static RepeatRuleDateTime::withFallbackTzid (   $date,
  $fallback_tzid 
)
static

Definition at line 313 of file RRule.php.

◆ year()

RepeatRuleDateTime::year ( )

Definition at line 511 of file RRule.php.

Member Data Documentation

◆ $Format

RepeatRuleDateTime::$Format = 'c'
static

Definition at line 212 of file RRule.php.

◆ $is_date

RepeatRuleDateTime::$is_date
private

Definition at line 215 of file RRule.php.

◆ $tzid

RepeatRuleDateTime::$tzid
private

Definition at line 214 of file RRule.php.

◆ $UTCzone

RepeatRuleDateTime::$UTCzone
staticprivate

Definition at line 213 of file RRule.php.


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