|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.property.marshaller.ICalPropertyMarshaller.DateWriter
protected static class ICalPropertyMarshaller.DateWriter
Factory class for writing dates.
Constructor Summary | |
---|---|
ICalPropertyMarshaller.DateWriter(Date date)
Creates a new date writer object. |
Method Summary | |
---|---|
ICalPropertyMarshaller.DateWriter |
extended(boolean extended)
Sets whether to use extended format or basic. |
ICalPropertyMarshaller.DateWriter |
localTz(boolean localTz)
Outputs the date in local time (without a timezone). |
ICalPropertyMarshaller.DateWriter |
time(boolean hasTime)
Sets whether to output the date's time component. |
ICalPropertyMarshaller.DateWriter |
tz(boolean localTz,
String timezoneId)
Convenience method that combines localTz(boolean) and
tzid(String) into one method. |
ICalPropertyMarshaller.DateWriter |
tz(TimeZone timezone)
Sets the timezone to format the date as. |
ICalPropertyMarshaller.DateWriter |
tzid(String timezoneId)
Sets the ID of the timezone to format the date as (TZID parameter value). |
String |
write()
Creates the date string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ICalPropertyMarshaller.DateWriter(Date date)
date
- the date to formatMethod Detail |
---|
public ICalPropertyMarshaller.DateWriter time(boolean hasTime)
hasTime
- true include the time, false if it's strictly a date
(defaults to "true")
public ICalPropertyMarshaller.DateWriter tzid(String timezoneId)
timezoneId
- the timezone ID. If the ID is global (contains a
"/" character), it will attempt to look up the timezone in Java's
timezone registry and format the date according to that timezone. If
the timezone is not found, the date will be formatted in UTC. If the
ID is not global, it will be formatted according to the JVM's default
timezone. If no timezone preference is specified, the date will be
formatted as UTC.
public ICalPropertyMarshaller.DateWriter localTz(boolean localTz)
localTz
- true to use local time, false not to
public ICalPropertyMarshaller.DateWriter tz(boolean localTz, String timezoneId)
localTz(boolean)
and
tzid(String)
into one method.
localTz
- true to use local time, false not totimezoneId
- the timezone ID
public ICalPropertyMarshaller.DateWriter tz(TimeZone timezone)
timezone
- the timezone
public ICalPropertyMarshaller.DateWriter extended(boolean extended)
extended
- true to use extended format, false to use basic
(defaults to "false")
public String write()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |