Constructor
new Timezone(data)
Creates a new ICAL.Timezone instance, by passing in a tzid and component.
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | ICAL. | options for class Properties
|
- Source
var vcalendar;
var timezoneComp = vcalendar.getFirstSubcomponent('vtimezone');
var tzid = timezoneComp.getFirstPropertyValue('tzid');
var timezone = new ICAL.Timezone({
component: timezoneComp,
tzid
});
Members
component :ICAL.Component
The vtimezone component for this timezone.
- Source
(constant) icalclass :String
The class identifier.
- String
- Default Value
- "icaltimezone"
- Source
latitude :Number
The primary latitude for the timezone.
- Number
- Source
location :String
Timezone location
- String
- Source
longitude :Number
The primary longitude for the timezone.
- Number
- Source
tzid :String
Timezone identifier
- String
- Source
tznames :String
Alternative timezone name, for the string representation
- String
- Source
Methods
fromData(aData)
Sets up the current instance using members from the passed data object.
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aData | ICAL. | options for class Properties
|
- Source
toString() → {String}
The string representation of this timezone.
- Source
- Type:
- String
utcOffset(tt) → {Number}
Finds the utcOffset the given time would occur in this timezone.
Name | Type | Description |
---|---|---|
tt | ICAL. | The time to check for |
- Source
utc offset in seconds
- Type:
- Number
(static) convert_time(tt, from_zone, to_zone) → {ICAL.Time}
Convert the date/time from one zone to the next.
Name | Type | Description |
---|---|---|
tt | ICAL. | The time to convert |
from_zone | ICAL. | The source zone to convert from |
to_zone | ICAL. | The target zone to convert to |
- Source
The converted date/time object
- Type:
- ICAL.
Time
(static) fromData(aData)
Creates a new ICAL.Timezone instance from the passed data object.
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aData | ICAL. | options for class Properties
|
- Source