## RepeatRuleDateTime

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.

Located in /inc/RRule-v2.php (line 204)

    DateTime
       |
       --RepeatRuleDateTime

Variable Summary
static mixed $Format
Method Summary
static int daysInMonth (int $year, int $month)
static 1 hasLeapDay (int $year)
RepeatRuleDateTime __construct ([ $date = null], [ $dtz = null], [ $is_date = null])
void AsDate ()
void day ()
void epoch ()
void FloatOrUTC ([ $return_floating_times = false])
void getTimeZone ()
void hour ()
void isDate ()
void isFloating ()
void minute ()
void modify ( $interval)
void month ()
void RFC5545 ([ $return_floating_times = false])
void second ()
void setAsDate ()
void setAsFloat ()
void setDate ([ $year = null], [ $month = null], [ $day = null])
void setTimeZone ( $tz)
void setYearDay ( $yearday)
void UTC ([ $fmt = 'Ymd\THis\Z'])
void year ()
void __toString ()
Variables
static mixed $Format = 'c' (line 206)

- access: public

Methods
static daysInMonth (line 453)

Returns the number of days in a year/month pair

- return: the number of days in the month
- access: public

int daysInMonth (int $year, int $month)

- int $year
- int $month

static hasLeapDay (line 442)

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

- return: if this is a leap year, 0 otherwise
- access: public

1 hasLeapDay (int $year)

- int $year: The year we are quizzical about.

Constructor __construct (line 211)

- access: public

RepeatRuleDateTime __construct ([ $date = null], [ $dtz = null], [ $is_date = null])

- $date
- $dtz
- $is_date

Redefinition of:

DateTime::constructor __construct ( [$time = ], [$object = ] )

AsDate (line 308)

- access: public

void AsDate ()
day (line 494)
void day ()
epoch (line 510)
void epoch ()
FloatOrUTC (line 388)

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: RepeatRuleDateTime::UTC()
- access: public

void FloatOrUTC ([ $return_floating_times = false])

- $return_floating_times

getTimeZone (line 432)

- access: public

void getTimeZone ()

Redefinition of:

DateTime::getTimezone ( )

hour (line 498)
void hour ()
isDate (line 322)

- access: public

void isDate ()
isFloating (line 318)

- access: public

void isFloating ()
minute (line 502)
void minute ()
modify (line 332)

- access: public

void modify ( $interval)

- $interval

Redefinition of:

DateTime::modify ( $modify )

month (line 490)
void month ()
RFC5545 (line 404)

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

- access: public

void RFC5545 ([ $return_floating_times = false])

- $return_floating_times

second (line 506)
void second ()
setAsDate (line 327)

- access: public

void setAsDate ()
setAsFloat (line 313)

- access: public

void setAsFloat ()
setDate (line 460)
void setDate ([ $year = null], [ $month = null], [ $day = null])

- $year
- $month
- $day

Redefinition of:

DateTime::setDate ( $year, $month, $day )

setTimeZone (line 422)

- access: public

void setTimeZone ( $tz)

- $tz

Redefinition of:

DateTime::setTimezone ( $timezone )

setYearDay (line 471)
void setYearDay ( $yearday)

- $yearday

UTC (line 361)

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: RepeatRuleDateTime::FloatOrUTC()
- access: public

void UTC ([ $fmt = 'Ymd\THis\Z'])

- $fmt

year (line 486)
void year ()
__toString (line 303)

- access: public

void __toString ()

#### Inherited Methods

Inherited From DateTime (Internal Class)

> constructor __construct ( [$time = ], [$object = ] )
> add ( $interval )
> createFromFormat ( $format, $time, [$object = ] )
> diff ( $object, [$absolute = ] )
> format ( $format )
> getLastErrors ( )
> getOffset ( )
> getTimestamp ( )
> getTimezone ( )
> modify ( $modify )
> setDate ( $year, $month, $day )
> setISODate ( $year, $week, [$day = ] )
> setTime ( $hour, $minute, [$second = ] )
> setTimestamp ( $unixtimestamp )
> setTimezone ( $timezone )
> sub ( $interval )
> __set_state ( )
> __wakeup ( )

Class Constants

#### Inherited Constants

Inherited from DateTime (Internal Class)

> ATOM = 'Y-m-d\\TH:i:sP'
> COOKIE = 'l, d-M-y H:i:s T'
> ISO8601 = 'Y-m-d\\TH:i:sO'
> RFC822 = 'D, d M y H:i:s O'
> RFC850 = 'l, d-M-y H:i:s T'
> RFC1036 = 'D, d M y H:i:s O'
> RFC1123 = 'D, d M Y H:i:s O'
> RFC2822 = 'D, d M Y H:i:s O'
> RFC3339 = 'Y-m-d\\TH:i:sP'
> RSS = 'D, d M Y H:i:s O'
> W3C = 'Y-m-d\\TH:i:sP'

Documentation generated on Mon, 24 Oct 2011 20:09:29 +1300 by phpDocumentor 1.4.3