public class TimezoneInfo extends Object
Constructor and Description |
---|
TimezoneInfo() |
Modifier and Type | Method and Description |
---|---|
Collection<VTimezone> |
getComponents()
Gets all of the iCalendar
VTimezone components that have been
registered with this object. |
TimezoneAssignment |
getDefaultTimezone()
Gets the timezone to format all date/time values in (by default, all
dates are formatted in UTC).
|
TimezoneAssignment |
getTimezone(ICalProperty property)
Gets the timezone that is assigned to a property.
|
TimezoneAssignment |
getTimezoneById(String tzid)
Gets the timezone whose
VTimezone component contains a
TimezoneId property with the given value. |
Collection<TimezoneAssignment> |
getTimezones()
Gets all the timezones assigned to this object.
|
TimezoneAssignment |
getTimezoneToWriteIn(ICalProperty property)
Determines the timezone that a particular property should be formatted in
when written to an output stream.
|
boolean |
isFloating(ICalProperty property)
Determines if a property value should be formatted in floating time when
written to an output stream.
|
boolean |
isGlobalFloatingTime()
Gets whether to format all date/time values as floating times (defaults
to false).
|
void |
setDefaultTimezone(TimezoneAssignment timezone)
Sets the timezone to format all date/time values in (by default, all
dates are formatted in UTC).
|
void |
setFloating(ICalProperty property,
boolean enable)
Sets whether a property value should be formatted in floating time when
written to an output stream (by default, floating time is disabled for
all properties).
|
void |
setGlobalFloatingTime(boolean enable)
Sets whether to format all date/time values as floating times (defaults
to false).
|
void |
setTimezone(ICalProperty property,
TimezoneAssignment timezone)
Assigns a timezone to a specific property.
|
public TimezoneInfo()
public Collection<TimezoneAssignment> getTimezones()
public TimezoneAssignment getDefaultTimezone()
Gets the timezone to format all date/time values in (by default, all dates are formatted in UTC).
The default timezone is not used for properties that are configured to
use their own timezone (see setTimezone(biweekly.property.ICalProperty, biweekly.io.TimezoneAssignment)
).
public void setDefaultTimezone(TimezoneAssignment timezone)
Sets the timezone to format all date/time values in (by default, all dates are formatted in UTC).
The default timezone is not used for properties that are configured to
use their own timezone (see setTimezone(biweekly.property.ICalProperty, biweekly.io.TimezoneAssignment)
).
timezone
- the timezone or null to use UTCpublic void setTimezone(ICalProperty property, TimezoneAssignment timezone)
property
- the propertytimezone
- the timezone or null to format the property according to
the default timezone (see setDefaultTimezone(biweekly.io.TimezoneAssignment)
).public TimezoneAssignment getTimezone(ICalProperty property)
property
- the propertypublic TimezoneAssignment getTimezoneToWriteIn(ICalProperty property)
Determines the timezone that a particular property should be formatted in when written to an output stream.
Note: You should call isFloating(biweekly.property.ICalProperty)
first, to determine if the
property's value is floating (without a timezone).
property
- the propertypublic TimezoneAssignment getTimezoneById(String tzid)
VTimezone
component contains a
TimezoneId
property with the given value.tzid
- the value of the TimezoneId
propertypublic boolean isGlobalFloatingTime()
Gets whether to format all date/time values as floating times (defaults to false).
This setting does not apply to properties whose floating time settings
are configured individually (see: setFloating(biweekly.property.ICalProperty, boolean)
) or that are
configured to use their own timezone (see setTimezone(biweekly.property.ICalProperty, biweekly.io.TimezoneAssignment)
).
A floating time value does not have a timezone associated with it, and is to be interpreted as being in the local timezone of the computer that is consuming the iCalendar object.
public void setGlobalFloatingTime(boolean enable)
Sets whether to format all date/time values as floating times (defaults to false).
This setting does not apply to properties whose floating time settings
are configured individually (see: setFloating(biweekly.property.ICalProperty, boolean)
) or that are
configured to use their own timezone (see setTimezone(biweekly.property.ICalProperty, biweekly.io.TimezoneAssignment)
).
A floating time value does not have a timezone associated with it, and is to be interpreted as being in the local timezone of the computer that is consuming the iCalendar object.
enable
- true to enable, false to disablepublic boolean isFloating(ICalProperty property)
property
- the propertypublic void setFloating(ICalProperty property, boolean enable)
Sets whether a property value should be formatted in floating time when written to an output stream (by default, floating time is disabled for all properties).
A floating time value does not have a timezone associated with it, and is to be interpreted as being in the local timezone of the computer that is consuming the iCalendar object.
property
- the propertyenable
- true to enable floating time for this property, false to
disablepublic Collection<VTimezone> getComponents()
VTimezone
components that have been
registered with this object.Copyright © 2013-2017 Michael Angstadt. All Rights Reserved.