protected static class ICalPropertyScribe.DateWriter extends Object
| Constructor and Description |
|---|
ICalPropertyScribe.DateWriter(Date date)
Creates a new date writer object.
|
| Modifier and Type | Method and Description |
|---|---|
ICalPropertyScribe.DateWriter |
extended(boolean extended)
Sets whether to use extended format or basic.
|
ICalPropertyScribe.DateWriter |
localTz(boolean localTz)
Outputs the date in local time (without a timezone).
|
ICalPropertyScribe.DateWriter |
time(boolean hasTime)
Sets whether to output the date's time component.
|
ICalPropertyScribe.DateWriter |
tz(boolean localTz,
String timezoneId)
Convenience method that combines
localTz(boolean) and
tzid(String) into one method. |
ICalPropertyScribe.DateWriter |
tz(TimeZone timezone)
Sets the timezone to format the date as.
|
ICalPropertyScribe.DateWriter |
tzid(String timezoneId)
Sets the ID of the timezone to format the date as (TZID parameter
value).
|
String |
write()
Creates the date string.
|
public ICalPropertyScribe.DateWriter(Date date)
date - the date to formatpublic ICalPropertyScribe.DateWriter time(boolean hasTime)
hasTime - true include the time, false if it's strictly a date
(defaults to "true")public ICalPropertyScribe.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 ICalPropertyScribe.DateWriter localTz(boolean localTz)
localTz - true to use local time, false not topublic ICalPropertyScribe.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 IDpublic ICalPropertyScribe.DateWriter tz(TimeZone timezone)
timezone - the timezonepublic ICalPropertyScribe.DateWriter extended(boolean extended)
extended - true to use extended format, false to use basic
(defaults to "false")Copyright © 2013-2014 Michael Angstadt. All Rights Reserved.