public class VTimezone extends ICalComponent
Defines a timezone's UTC offsets throughout the year.
Examples:
VTimezone timezone = new VTimezone("Eastern Standard Time");
StandardTime standard = new StandardTime();
DateTimeComponents componentsStandard = new DateTimeComponents(1998, 10, 25, 2, 0, 0, false);
standard.setDateStart(componentsStandard);
standard.setTimezoneOffsetFrom(-4, 0);
standard.setTimezoneOffsetTo(-5, 0);
timezone.addStandardTime(standard);
DaylightSavingsTime daylight = new DaylightSavingsTime();
DateTimeComponents componentsDaylight = new DateTimeComponents(1999, 4, 4, 2, 0, 0, false);
daylight.setDateStart(componentsDaylight);
daylight.setTimezoneOffsetFrom(-5, 0);
daylight.setTimezoneOffsetTo(-4, 0);
timezone.addDaylightSavingsTime(daylight);
components, properties| Constructor and Description |
|---|
VTimezone(String identifier)
Creates a new timezone component.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDaylightSavingsTime(DaylightSavingsTime daylightSavingsTime)
Adds a "daylight savings" observance time range.
|
void |
addStandardTime(StandardTime standardTime)
Adds a "standard" observance time range.
|
List<DaylightSavingsTime> |
getDaylightSavingsTime()
Gets the timezone's "daylight savings" observance time ranges.
|
LastModified |
getLastModified()
Gets the date-time that the timezone data was last changed.
|
List<StandardTime> |
getStandardTimes()
Gets the timezone's "standard" observance time ranges.
|
TimezoneId |
getTimezoneId()
Gets the ID for this timezone.
|
TimezoneUrl |
getTimezoneUrl()
Gets the timezone URL, which points to an iCalendar object that contains
further information on the timezone.
|
LastModified |
setLastModified(Date lastModified)
Sets the date-time that the timezone data was last changed.
|
void |
setLastModified(LastModified lastModified)
Sets the date-time that the timezone data was last changed.
|
TimezoneId |
setTimezoneId(String timezoneId)
Sets an ID for this timezone.
|
void |
setTimezoneId(TimezoneId timezoneId)
Sets an ID for this timezone.
|
TimezoneUrl |
setTimezoneUrl(String url)
Sets the timezone URL, which points to an iCalendar object that contains
further information on the timezone.
|
void |
setTimezoneUrl(TimezoneUrl url)
Sets the timezone URL, which points to an iCalendar object that contains
further information on the timezone.
|
protected void |
validate(List<ICalComponent> components,
List<Warning> warnings)
Checks the component for data consistency problems or deviations from the
spec.
|
addComponent, addExperimentalComponent, addExperimentalProperty, addExperimentalProperty, addProperty, checkOptionalCardinality, checkRequiredCardinality, checkStatus, getComponent, getComponents, getComponents, getExperimentalComponent, getExperimentalComponents, getExperimentalComponents, getExperimentalProperties, getExperimentalProperties, getExperimentalProperty, getProperties, getProperties, getProperty, removeExperimentalComponents, removeExperimentalProperty, removeProperties, setComponent, setComponent, setExperimentalComponents, setExperimentalProperty, setExperimentalProperty, setProperty, setProperty, validatepublic TimezoneId getTimezoneId()
public void setTimezoneId(TimezoneId timezoneId)
timezoneId - the timezone ID or null to removepublic TimezoneId setTimezoneId(String timezoneId)
timezoneId - the timezone ID or null to removepublic LastModified getLastModified()
public void setLastModified(LastModified lastModified)
lastModified - the last modified date or null to removepublic LastModified setLastModified(Date lastModified)
lastModified - the last modified date or null to removepublic TimezoneUrl getTimezoneUrl()
public void setTimezoneUrl(TimezoneUrl url)
url - the URL or null to removepublic TimezoneUrl setTimezoneUrl(String url)
url - the timezone URL (e.g.
"http://example.com/America-New_York.ics") or null to removepublic List<StandardTime> getStandardTimes()
public void addStandardTime(StandardTime standardTime)
standardTime - the "standard" observance timepublic List<DaylightSavingsTime> getDaylightSavingsTime()
public void addDaylightSavingsTime(DaylightSavingsTime daylightSavingsTime)
daylightSavingsTime - the "daylight savings" observance timeprotected void validate(List<ICalComponent> components, List<Warning> warnings)
ICalComponentvalidate in class ICalComponentcomponents - the hierarchy of components that the component belongs
towarnings - the list to add the warnings toCopyright © 2013-2014 Michael Angstadt. All Rights Reserved.