Value Types

Much like PHP and other programming languages, iCalendar defines several “types” for which values must fall into. In PHP, these “value types” are “boolean”, “integer”, “float”, “string”, “array”, and “object”. In the iCalendar spec, iCalendar property values fall into a larger set of more specific “value types”.

Binary

Binary files such as images, pdf files, etc. can be directly embedded into an iCalendar file using this value type.

This value type is used to identify properties that contain a character encoding of inline binary data. For example, an inline attachment of an object code might be included in an iCalendar object.

Specification http://www.ietf.org/rfc/rfc2445.txt

Binary values are represented in qCal by the qCal_Value_Binary class.

Boolean

When a property can only represent either true or false, boolean is used as the value type.

This value type is used to identify properties that contain either a “TRUE” or “FALSE” Boolean value.

Specification http://www.ietf.org/rfc/rfc2445.txt

Boolean values are represented in qCal by the qCal_Value_Boolean class.

Cal-Address

iCalendar files often need to reference multiple calendar users. Each calendar user is identified by a mailto URI which points to their e-mail address. This value type is used for those e-mail address URIs.

This value type is used to identify properties that contain a calendar user address.

Specification http://www.ietf.org/rfc/rfc2445.txt

Cal-Address values are represented in qCal by the qCal_Value_CalAddress class.

Date

Any time a property needs to represent a date only (without any time associated with it), this value type will be used.

This value type is used to identify values that contain a calendar date.

Specification http://www.ietf.org/rfc/rfc2445.txt

Date values are represented in qCal by the qCal_Value_Date class (which in turn uses the qCal_Date class internally to store the actual date).

Date-Time

For obvious reasons, this is one of the most often-used value types in the specification. There are many cases where a property will need to reference a specific point in time, on a specific date. In those cases, this value type is used.

This value type is used to identify values that specify a precise calendar date and time of day.

Specification http://www.ietf.org/rfc/rfc2445.txt

Date-Time values are represented in qCal by the qCal_Value_DateTime class (which in turn uses the qCal_DateTime class internally to store the actual date/time).

Duration

If a property needs to represent a duration of time such as “three weeks”, this value type is used.

This value type is used to identify properties that contain a duration of time.

Specification http://www.ietf.org/rfc/rfc2445.txt

Duration values are represented in qCal by the qCal_Value_Duration class (which in turn uses the qCal_DateTime_Duration class internally to store the actual duration).

Float

If a property needs to represent a value which contains a real number (a dollar amount for example), this value type is used. This value type is similar to PHP's float value type.

This value type is used to identify properties that contain a real number value.

Specification http://www.ietf.org/rfc/rfc2445.txt

Float values are represented in qCal by the qCal_Value_Float class.

Integer

This value type is very similar to PHP's own integer value type. Many properties in the specification will need to represent an integer. For instance, often a component will need to be assigned a priority number, a sequence number, or an interval. This value type is used in those cases.

This value type is used to identify properties that contain a signed integer value.

Specification http://www.ietf.org/rfc/rfc2445.txt

Integer values are represented in qCal by the qCal_Value_Integer class.

Period

A time period is similar to a duration of time. The difference is that a time period must be tied to a specific point in time, whereas a duration does not. A time period must have a start and end date and time. This can be achieved either by specifying a start date and a duration of time (from 2009-10-31 at 4:00pm until three weeks later), or simply a start and end date/time (from 2009-10-31 at 4:00pm until 2009-11-20 at 10:00pm).

This value type is used to identify values that contain a precise period of time.

Specification http://www.ietf.org/rfc/rfc2445.txt

Period values are represented in qCal by the qCal_Value_Period class (which in turn uses the qCal_DateTime_Period class internally to store the actual time period).

Recur

Recur is by far the most complex of all of iCalendar's value types. It is used to specify a recurrence of dates and times according to a specific pattern. For instance, every third Wednesday in February of every year.

This value type is used to identify properties that contain a recurrence rule specification.

Specification http://www.ietf.org/rfc/rfc2445.txt

Recur values are represented in qCal by the qCal_Value_Recur class (which in turn uses the qCal_DateTime_Recur class internally to store the actual recurrence rule).

Text

Any time a property simply needs to represent a text value, this value type is used. Event titles, journal entries and event locations are all examples of properties that would require a text value type.

This value type is used to identify values that contain human readable text.

Specification http://www.ietf.org/rfc/rfc2445.txt

Text values are represented in qCal by the qCal_Value_Text class.

Time

Properties that need to represent a time of day, without being associated with a specific date will use this value type.

This value type is used to identify values that contain a time of day.

Specification http://www.ietf.org/rfc/rfc2445.txt

Time values are represented in qCal by the qCal_Value_Time class (which stores the time value internally as a qCal_Time object).

URI

If a property needs to represent a location of a resource on the web, this value type is used. The most common use for this value type is to associate a remote resource (such as a sound file) to the iCalendar file.

This value type is used to identify values that contain a uniform resource identifier (URI) type of reference to the property value.

Specification http://www.ietf.org/rfc/rfc2445.txt

URI values are represented in qCal by the qCal_Value_Uri class.

UTC-Offset

If a property needs to represent a value that contains a timezone offset, this value type is used. For instance, often a date/time is represented as a UTC string. A UTC-Offset is used to find the local time when given the UTC time.

This value type is used to identify properties that contain an offset from UTC to local time.

Specification http://www.ietf.org/rfc/rfc2445.txt

UTC-Offset values are represented in qCal by the qCal_Value_UtcOffset class.

 
/home/luke/dokuwiki/data/pages/icalendar_value_types.txt · Last modified: 2010/01/15 00:41 by luke
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki