|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.property.marshaller.ICalPropertyMarshaller.DateParser
protected static class ICalPropertyMarshaller.DateParser
Factory class for parsing dates.
Constructor Summary | |
---|---|
ICalPropertyMarshaller.DateParser(String value)
Creates a new date writer object. |
Method Summary | |
---|---|
Date |
parse()
Parses the date string. |
ICalPropertyMarshaller.DateParser |
tz(TimeZone timezone)
Sets the timezone to parse the date as. |
ICalPropertyMarshaller.DateParser |
tzid(String timezoneId)
Sets the ID of the timezone to parse the date as (TZID parameter value). |
ICalPropertyMarshaller.DateParser |
tzid(String timezoneId,
List<String> warnings)
Sets the ID of the timezone to parse the date as (TZID parameter value). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ICalPropertyMarshaller.DateParser(String value)
value
- the date string to parseMethod Detail |
---|
public ICalPropertyMarshaller.DateParser tzid(String timezoneId)
timezoneId
- the timezone ID
public ICalPropertyMarshaller.DateParser tzid(String timezoneId, List<String> 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 list
public ICalPropertyMarshaller.DateParser tz(TimeZone timezone)
timezone
- the timezone
public Date parse()
IllegalArgumentException
- if the date string is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |