public class DateOrDateTimeProperty extends ICalProperty
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasTime |
protected boolean |
localTime |
protected DateTimeComponents |
rawComponents |
protected Date |
value |
parameters| Constructor and Description |
|---|
DateOrDateTimeProperty(Date value,
boolean hasTime)
Creates a new property.
|
DateOrDateTimeProperty(DateTimeComponents rawComponents)
Creates a new property.
|
| Modifier and Type | Method and Description |
|---|---|
DateTimeComponents |
getRawComponents()
Gets the raw components of the date-time value.
|
String |
getTimezoneId()
Gets the timezone identifier.
|
Date |
getValue()
Gets the date-time value.
|
boolean |
hasTime()
Determines whether the date-time value has a time component.
|
boolean |
isLocalTime()
Gets whether the date should be outputted in local time (without a
timezone).
|
void |
setLocalTime(boolean localTime)
Sets whether the date should be outputted in local time (without a
timezone).
|
void |
setRawComponents(DateTimeComponents rawComponents)
Sets the raw components of the date-time value.
|
void |
setTimezone(VTimezone timezone)
Sets the property's timezone to a timezone that is defined within the
iCalendar object.
|
void |
setTimezoneId(String timezoneId)
Sets the timezone identifier.
|
void |
setValue(Date value,
boolean hasTime)
Sets the date-time value.
|
protected void |
validate(List<ICalComponent> components,
List<Warning> warnings)
Checks the property for data consistency problems or deviations from the
spec.
|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validateprotected DateTimeComponents rawComponents
protected boolean hasTime
protected boolean localTime
public DateOrDateTimeProperty(DateTimeComponents rawComponents)
rawComponents - the raw components of the date-time valuepublic DateOrDateTimeProperty(Date value, boolean hasTime)
value - the date-time valuehasTime - true if the value has a time component, false if it is
strictly a datepublic void setValue(Date value, boolean hasTime)
value - the date-time valuehasTime - true if the value has a time component, false if it is
strictly a datepublic DateTimeComponents getRawComponents()
public void setRawComponents(DateTimeComponents rawComponents)
rawComponents - the raw componentspublic boolean hasTime()
public boolean isLocalTime()
public void setLocalTime(boolean localTime)
setTimezoneId(String) to specify a timezone.
Dates are written in UTC time by default.localTime - true to output the date without a timezone, false to
include a timezone (defaults to false)public String getTimezoneId()
ICalPropertyTimezoneId property of a VTimezone component, or (b)
specifies a globally-defined timezone (e.g. "America/New_York"). For a
list of globally-defined timezones, see the TZ database.public void setTimezoneId(String timezoneId)
ICalPropertyTimezoneId property of a VTimezone component, or (b)
specifies a globally-defined timezone (e.g. "America/New_York"). For a
list of globally-defined timezones, see the TZ database.timezoneId - the timezone identifier (e.g. "America/New_York") or
null to removepublic void setTimezone(VTimezone timezone)
ICalPropertyICalProperty.setTimezoneId(String) to use a
globally-defined timezone (e.g. "America/New_York").timezone - the timezone component to reference or null to removeprotected void validate(List<ICalComponent> components, List<Warning> warnings)
ICalPropertyvalidate in class ICalPropertycomponents - the hierarchy of components that the property belongs
towarnings - the list to add the warnings toCopyright © 2013-2014 Michael Angstadt. All Rights Reserved.