protected static class ICalPropertyScribe.DateParser extends Object
| Constructor and Description |
|---|
ICalPropertyScribe.DateParser(String value)
Creates a new date writer object.
|
| Modifier and Type | Method and Description |
|---|---|
Date |
parse()
Parses the date string.
|
ICalPropertyScribe.DateParser |
tz(TimeZone timezone)
Sets the timezone to parse the date as.
|
ICalPropertyScribe.DateParser |
tzid(String timezoneId)
Sets the ID of the timezone to parse the date as (TZID parameter
value).
|
ICalPropertyScribe.DateParser |
tzid(String timezoneId,
List<Warning> warnings)
Sets the ID of the timezone to parse the date as (TZID parameter
value).
|
public ICalPropertyScribe.DateParser(String value)
value - the date string to parsepublic ICalPropertyScribe.DateParser tzid(String timezoneId)
timezoneId - the timezone IDpublic ICalPropertyScribe.DateParser tzid(String timezoneId, List<Warning> warnings)
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 parse the date according to that timezone. If
the timezone is not found, the date will be parsed according to the
JVM's default timezone and a warning message will be added to the
provided warnings list. If the ID is not global, it will be parsed
according to the JVM's default timezone. Whichever timezone is chosen
here, it will be ignored if the date string is in UTC time or
contains an offset.warnings - if the ID is global and is not recognized, a warning
message will be added to this listpublic ICalPropertyScribe.DateParser tz(TimeZone timezone)
timezone - the timezonepublic Date parse()
IllegalArgumentException - if the date string is invalidCopyright © 2013-2014 Michael Angstadt. All Rights Reserved.