public class TimezoneAssignment extends Object
| Constructor and Description |
|---|
TimezoneAssignment(TimeZone timezone,
String globalId)
Creates a timezone that will be inserted into the iCalendar object as a
"global ID".
|
TimezoneAssignment(TimeZone timezone,
VTimezone component)
Creates a timezone that will be inserted into the iCalendar object as a
VTIMEZONE component.
|
| Modifier and Type | Method and Description |
|---|---|
static TimezoneAssignment |
download(TimeZone timezone,
boolean outlookCompatible)
Creates a timezone whose VTIMEZONE component is downloaded from
tzurl.org.
|
VTimezone |
getComponent()
Gets the iCalendar component associated with the timezone.
|
String |
getGlobalId()
Gets the global ID associated with the timezone.
|
TimeZone |
getTimeZone()
Gets the Java object associated with the timezone.
|
public TimezoneAssignment(TimeZone timezone, VTimezone component)
timezone - the Java timezone objectcomponent - the iCalendar componentIllegalArgumentException - if the given VTimezone component
doesn't have a TimezoneId propertypublic TimezoneAssignment(TimeZone timezone, String globalId)
Creates a timezone that will be inserted into the iCalendar object as a
"global ID". This means that a VTimezone component containing the
timezone definition will NOT be inserted into the iCalendar object.
Because the timezone definition is not included inside of the iCalendar object, the client consuming the iCalendar object must know how to interpret such an ID. The iCalendar specification does not specify a list of such IDs, but suggests using the naming convention of an existing timezone specification, such as the public-domain TZ database.
timezone - the Java timezone objectglobalId - the global ID (e.g. "America/New_York")public static TimezoneAssignment download(TimeZone timezone, boolean outlookCompatible)
timezone - the Java timezone objectoutlookCompatible - true to download a VTimezone component
that is tailored for Microsoft Outlook email clients, false to download a
standards-based one.IllegalArgumentException - if an appropriate VTIMEZONE component
cannot be found on the websitepublic TimeZone getTimeZone()
public VTimezone getComponent()
public String getGlobalId()
Copyright © 2013–2024 Michael Angstadt. All rights reserved.