Overview

Packages

  • awl
    • caldav-client-v2
    • RRule
  • davical
    • authentication
      • drivers
    • caldav
    • DAViCalSession
    • DAVTicket
    • external-bind
    • feed
    • HTTPAuthSession
    • iSchedule
    • iSchedule-POST
    • logging
    • metrics
    • Principal
    • propfind
    • PublicSession
    • Request
    • Resource
    • tzservice
  • None

Classes

  • RepeatRule
  • RepeatRuleDateRange
  • RepeatRuleDateTime
  • RepeatRuleTimeZone
  • Rfc5545Duration

Functions

  • expand_event_instances
  • getComponentRange
  • getVCalendarRange
  • olson_from_vtimezone
  • rdate_expand
  • rrule_expand
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class RepeatRuleDateTime

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.

DateTime implements DateTimeInterface
Extended by RepeatRuleDateTime
Package: awl\RRule
Copyright: Morphoss Ltd
License: GNU GPL v2 or later
Author: Andrew McMillan andrew@mcmillan.net.nz
Located at RRule.php
Methods summary
public
# __construct( $date = null, $dtz = null, $is_date = null )

Overrides

DateTime::__construct()
public
# __toString( )
public
# AsDate( )
public
# setAsFloat( )
public
# isFloating( )
public
# isDate( )
public
# setAsDate( )
public
# modify( $interval )

Overrides

DateTime::modify()
public
# 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.

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()
public
# 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 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()
public
# RFC5545( $return_floating_times = false )

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

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

public
# setTimeZone( $tz )
public
# getTimeZone( )
public static 1
# hasLeapDay( integer $year )

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

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

Parameters

$year
The year we are quizzical about.

Returns

1
if this is a leap year, 0 otherwise
public static integer
# daysInMonth( integer $year, integer $month )

Returns the number of days in a year/month pair

Returns the number of days in a year/month pair

Parameters

$year
$month

Returns

integer
the number of days in the month
public
# setDate( $year = null, $month = null, $day = null )

Overrides

DateTime::setDate()
public
# setYearDay( $yearday )
public
# year( )
public
# month( )
public
# day( )
public
# hour( )
public
# minute( )
public
# second( )
public
# epoch( )
Methods inherited from DateTime
__set_state(), __wakeup(), add(), createFromFormat(), diff(), format(), getLastErrors(), getOffset(), getTimestamp(), getTimezone(), setISODate(), setTime(), setTimestamp(), setTimezone(), sub()
Constants inherited from DateTime
ATOM, COOKIE, ISO8601, RFC1036, RFC1123, RFC2822, RFC3339, RFC3339_EXTENDED, RFC7231, RFC822, RFC850, RSS, W3C
Properties summary
public static string $Format
# 'c'
DAViCal API documentation generated by ApiGen