Overview

Packages

  • Kolab
    • Format

Classes

  • Horde_Kolab_Format_Date
  • Horde_Kolab_Format_Decorator_Base
  • Horde_Kolab_Format_Decorator_Memory
  • Horde_Kolab_Format_Decorator_Timed
  • Horde_Kolab_Format_Exception
  • Horde_Kolab_Format_Exception_InvalidRoot
  • Horde_Kolab_Format_Exception_MissingUid
  • Horde_Kolab_Format_Exception_MissingValue
  • Horde_Kolab_Format_Exception_ParseError
  • Horde_Kolab_Format_Factory
  • Horde_Kolab_Format_Xml
  • Horde_Kolab_Format_Xml_Annotation
  • Horde_Kolab_Format_Xml_Contact
  • Horde_Kolab_Format_Xml_Distributionlist
  • Horde_Kolab_Format_Xml_Envelope
  • Horde_Kolab_Format_Xml_Event
  • Horde_Kolab_Format_Xml_Helper
  • Horde_Kolab_Format_Xml_Hprefs
  • Horde_Kolab_Format_Xml_Note
  • Horde_Kolab_Format_Xml_Parser
  • Horde_Kolab_Format_Xml_Task
  • Horde_Kolab_Format_Xml_Type_AddressType
  • Horde_Kolab_Format_Xml_Type_AttendeeRole
  • Horde_Kolab_Format_Xml_Type_AttendeeStatus
  • Horde_Kolab_Format_Xml_Type_AutomaticDate
  • Horde_Kolab_Format_Xml_Type_AutomaticDate_V1
  • Horde_Kolab_Format_Xml_Type_Base
  • Horde_Kolab_Format_Xml_Type_Boolean
  • Horde_Kolab_Format_Xml_Type_Boolean_True
  • Horde_Kolab_Format_Xml_Type_Color
  • Horde_Kolab_Format_Xml_Type_Color_Background
  • Horde_Kolab_Format_Xml_Type_Color_Foreground
  • Horde_Kolab_Format_Xml_Type_Composite
  • Horde_Kolab_Format_Xml_Type_Composite_Address
  • Horde_Kolab_Format_Xml_Type_Composite_Attendee
  • Horde_Kolab_Format_Xml_Type_Composite_Name
  • Horde_Kolab_Format_Xml_Type_Composite_Phone
  • Horde_Kolab_Format_Xml_Type_Composite_Recurrence
  • Horde_Kolab_Format_Xml_Type_Composite_Recurrence_V1
  • Horde_Kolab_Format_Xml_Type_Composite_SimplePerson
  • Horde_Kolab_Format_Xml_Type_CreationDate
  • Horde_Kolab_Format_Xml_Type_CreationDate_V1
  • Horde_Kolab_Format_Xml_Type_Date
  • Horde_Kolab_Format_Xml_Type_Date_V1
  • Horde_Kolab_Format_Xml_Type_DateTime
  • Horde_Kolab_Format_Xml_Type_DateTime_V1
  • Horde_Kolab_Format_Xml_Type_EventDate
  • Horde_Kolab_Format_Xml_Type_EventDate_V1
  • Horde_Kolab_Format_Xml_Type_Integer
  • Horde_Kolab_Format_Xml_Type_ModificationDate
  • Horde_Kolab_Format_Xml_Type_Multiple
  • Horde_Kolab_Format_Xml_Type_Multiple_Address
  • Horde_Kolab_Format_Xml_Type_Multiple_Attendee
  • Horde_Kolab_Format_Xml_Type_Multiple_Boolean
  • Horde_Kolab_Format_Xml_Type_Multiple_Date
  • Horde_Kolab_Format_Xml_Type_Multiple_Phone
  • Horde_Kolab_Format_Xml_Type_Multiple_SimplePerson
  • Horde_Kolab_Format_Xml_Type_Multiple_String
  • Horde_Kolab_Format_Xml_Type_PhoneType
  • Horde_Kolab_Format_Xml_Type_PrefsApplication
  • Horde_Kolab_Format_Xml_Type_ProductId
  • Horde_Kolab_Format_Xml_Type_RecurrenceInterval
  • Horde_Kolab_Format_Xml_Type_RecurrenceRange
  • Horde_Kolab_Format_Xml_Type_RecurrenceRange_V1
  • Horde_Kolab_Format_Xml_Type_Root
  • Horde_Kolab_Format_Xml_Type_Sensitivity
  • Horde_Kolab_Format_Xml_Type_String
  • Horde_Kolab_Format_Xml_Type_String_Empty
  • Horde_Kolab_Format_Xml_Type_String_MaybeMissing
  • Horde_Kolab_Format_Xml_Type_TaskCompletion
  • Horde_Kolab_Format_Xml_Type_TaskPriority
  • Horde_Kolab_Format_Xml_Type_TaskStatus
  • Horde_Kolab_Format_Xml_Type_Uid
  • Horde_Kolab_Format_Xml_Type_XmlAppend

Interfaces

  • Horde_Kolab_Format
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Kolab_Format_Date

Kolab date handling functions. Based upon Kolab.php from Stuart Binge.

Copyright 2004-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Package: Kolab\Format
Category: Kolab
License: LGPL
Author: Stuart Binge omicron@mighty.co.za
Author: Thomas Jarosch thomas.jarosch@intra2net.com
Link: http://www.horde.org/libraries/Horde_Kolab_Format
Located at Horde/Kolab/Format/Date.php
Methods summary
public static integer
# decodeDate( string $date )

Returns a UNIX timestamp corresponding the given date string which is in the format prescribed by the Kolab Format Specification.

Returns a UNIX timestamp corresponding the given date string which is in the format prescribed by the Kolab Format Specification.

Parameters

$date
The string representation of the date.

Returns

integer
The unix timestamp corresponding to $date.
public static integer
# decodeDateTime( string $datetime )

Returns a UNIX timestamp corresponding the given date-time string which is in the format prescribed by the Kolab Format Specification.

Returns a UNIX timestamp corresponding the given date-time string which is in the format prescribed by the Kolab Format Specification.

Parameters

$datetime
The string representation of the date & time.

Returns

integer
The unix timestamp corresponding to $datetime.
public static integer
# decodeDateOrDateTime( string $date )

Returns a UNIX timestamp corresponding the given date or date-time string which is in either format prescribed by the Kolab Format Specification.

Returns a UNIX timestamp corresponding the given date or date-time string which is in either format prescribed by the Kolab Format Specification.

Parameters

$date
The string representation of the date (& time).

Returns

integer
The unix timestamp corresponding to $date.
public static string
# encodeDate( integer $date = false )

Returns a string containing the current UTC date in the format prescribed by the Kolab Format Specification.

Returns a string containing the current UTC date in the format prescribed by the Kolab Format Specification.

Parameters

$date
The integer representation of the date.

Returns

string
The current UTC date in the format 'YYYY-MM-DD'.
public static string
# encodeDateTime( integer $datetime = false )

Returns a string containing the current UTC date and time in the format prescribed by the Kolab Format Specification.

Returns a string containing the current UTC date and time in the format prescribed by the Kolab Format Specification.

Parameters

$datetime
The integer representation of the date.

Returns

string

The current UTC date and time in the format 'YYYY-MM-DDThh:mm:ssZ', where the T and Z are literal characters.

public static DateTime
# readUtcDateTime( string $date_time )

Parse the provided string into a PHP DateTime object.

Parse the provided string into a PHP DateTime object.

Parameters

$date_time
The Kolab date-time value.

Returns

DateTime
The date-time value represented as PHP DateTime object.

Since

Horde_Kolab_Format 1.1.0
public static DateTime
# readDate( string $date, string $timezone )

Parse the provided string into a PHP DateTime object.

Parse the provided string into a PHP DateTime object.

Parameters

$date
The Kolab date value.
$timezone
The associated timezone.

Returns

DateTime
The date-time value represented as PHP DateTime object.

Since

Horde_Kolab_Format 1.1.0
public static DateTime
# readDateTime( string $date_time, string $timezone )

Parse the provided string into a PHP DateTime object.

Parse the provided string into a PHP DateTime object.

Parameters

$date_time
The Kolab date-time value.
$timezone
The associated timezone.

Returns

DateTime
The date-time value represented as PHP DateTime object.

Since

Horde_Kolab_Format 1.1.0
public static string
# writeUtcDateTime( DateTime $date_time )

Write the provided PHP DateTime object into a Kolab format UTC date-time representation.

Write the provided PHP DateTime object into a Kolab format UTC date-time representation.

Parameters

$date_time
The PHP DateTime object.

Returns

string
The Kolab format UTC date-time string.

Since

Horde_Kolab_Format 1.1.0
public static string
# writeDateTime( DateTime $date_time )

Write the provided PHP DateTime object into a Kolab format date-time representation.

Write the provided PHP DateTime object into a Kolab format date-time representation.

Parameters

$date_time
The PHP DateTime object.

Returns

string
The Kolab format date-time string.

Since

Horde_Kolab_Format 1.1.0
public static string
# writeDate( DateTime $date )

Write the provided PHP DateTime object into a Kolab format date representation.

Write the provided PHP DateTime object into a Kolab format date representation.

Parameters

$date
The PHP DateTime object.

Returns

string
The Kolab format UTC date string.

Since

Horde_Kolab_Format 1.1.0
API documentation generated by ApiGen