calIDateTime Interface Reference

import "calIDateTime.idl";

Inheritance diagram for calIDateTime:

Inheritance graph
Collaboration diagram for calIDateTime:

Collaboration graph

List of all members.

Public Member Functions

void makeImmutable ()
 Make this calIDateTime instance immutable.
calIDateTime clone ()
 Clone this calIDateTime instance into a new mutable object.
void resetTo (in short year, in short month, in short day, in short hour, in short minute, in short second, in calITimezone timezone)
 Resets the datetime object.
void reset ()
 Resets this instance to Jan 1, 1970 00:00:00 UTC.
AUTF8String toString ()
 Return a string representation of this instance.
void setTimeInTimezone (in PRTime aTime, in calITimezone aTimezone)
 Set the value of this calIDateTime instance to aTime milliseconds since the epoch in the given timezone.
calIDateTime getInTimezone (in calITimezone aTimezone)
 Return a new calIDateTime instance that's the result of converting this one into the given timezone.
void addDuration (in calIDuration aDuration)
calIDuration subtractDate (in calIDateTime aOtherDate)
long compare (in calIDateTime aOther)
 Compare this calIDateTime instance to aOther.
void toIcalTime (in icaltimetypeptr itt)

Public Attributes

readonly attribute boolean isMutable
 isMutable is true if this instance is modifiable.
readonly attribute boolean isValid
 valid is true if this object contains a valid time/date.
attribute PRTime nativeTime
 nativeTime contains this instance's PRTime value relative to the UTC epoch, regardless of the timezone that's set on this instance.
attribute short year
 Full 4-digit year value (e.g.
attribute short month
 Month, 0-11, 0 = January.
attribute short day
 Day of month, 1-[28,29,30,31].
attribute short hour
 Hour, 0-23.
attribute short minute
 Minute, 0-59.
attribute short second
 Second, 0-59.
attribute calITimezone timezone
 Gets or sets the timezone of this calIDateTime instance.
readonly attribute long timezoneOffset
 The offset of the timezone this datetime is in, relative to UTC, in seconds.
attribute PRBool isDate
 isDate indicates that this calIDateTime instance represents a date (a whole day), and not a specific time on that day.
readonly attribute short weekday
 Day of the week.
readonly attribute short yearday
 Day of the year, 1-[365,366].
readonly attribute calIDateTime startOfWeek
readonly attribute calIDateTime endOfWeek
readonly attribute calIDateTime startOfMonth
readonly attribute calIDateTime endOfMonth
readonly attribute calIDateTime startOfYear
readonly attribute calIDateTime endOfYear
attribute ACString icalString
 This object as either an iCalendar DATE or DATETIME string, as appropriate and sets the timezone to either UTC or floating.

Member Function Documentation

void calIDateTime::makeImmutable (  ) 

calIDateTime calIDateTime::clone (  ) 

void calIDateTime::resetTo ( in short  year,
in short  month,
in short  day,
in short  hour,
in short  minute,
in short  second,
in calITimezone  timezone 

year full 4-digit year value (e.g. "1989", "2004")
month month, 0-11, 0 = January
day day of month, 1-[28,29,31]
hour hour, 0-23
minute minute, 0-59
second decond, 0-59
timezone timezone
The passed datetime will be normalized, e.g. a minute value of 60 will increase the hour.

NS_ERROR_INVALID_ARG if no timezone is passed in.

void calIDateTime::reset (  ) 

AUTF8String calIDateTime::toString (  ) 

void calIDateTime::setTimeInTimezone ( in PRTime  aTime,
in calITimezone  aTimezone 

calIDateTime calIDateTime::getInTimezone ( in calITimezone  aTimezone  ) 

Valid values for aTimezone are the same as the timezone field. If the "floating" timezone is given, then this object is just cloned, and the timezone is set to floating.

void calIDateTime::addDuration ( in calIDuration  aDuration  ) 

calIDuration calIDateTime::subtractDate ( in calIDateTime  aOtherDate  ) 

long calIDateTime::compare ( in calIDateTime  aOther  ) 

Returns -1, 0, 1 to indicate if this < aOther, this == aOther, or this > aOther, respectively.

This comparison is timezone-aware; the given values are converted to a common timezone before comparing. If either this or aOther is floating, both objects are treated as floating for the comparison.

If either this or aOther has isDate set, then only the date portion is compared.

calIErrors.INVALID_TIMEZONE bad timezone on this object (not the argument object)

void calIDateTime::toIcalTime ( in icaltimetypeptr  itt  ) 

Member Data Documentation

If isMutable is false, any attempts to modify the object will throw NS_ERROR_OBJECT_IS_IMMUTABLE.

If nativeTime is set, the given UTC PRTime value is exploded into year/month/etc, taking into account the timezone setting.

: When the timezone is set to 'floating', this will return the nativeTime as-if the timezone was UTC. Take this into account when comparing values.
on objects that are pinned to a timezone and have isDate set, nativeTime will be 00:00:00 in the timezone of that date, not 00:00:00 in UTC.

"1989", "2004")

Setting the timezone does not change the actual date/time components; to convert between timezones, use getInTimezone().

NS_ERROR_INVALID_ARG if null is passed in.

A positive number means that the timezone is ahead of UTC.

If isDate is set, accessing the hour/minute/second fields will return 0, and and setting them is an illegal operation.

0-6, with Sunday = 0.

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

Generated Mozilla by doxygen 1.5.6