edu.cmu.andrew.icalendar
Class DateType
java.lang.Object
|
+--edu.cmu.andrew.icalendar.DateType
- public final class DateType
- extends Object
Enumerated type representing the different ways of representing DATE-TIME objects in
iCalendar.
- Author:
- leg
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
name
private final String name
sdf
private final SimpleDateFormat sdf
UTC_TZ
private static final TimeZone UTC_TZ
DATE_TIME_UTC
public static final DateType DATE_TIME_UTC
DATE_TIME
public static final DateType DATE_TIME
DATE
public static final DateType DATE
DateType
private DateType(String name,
String format,
boolean localtime)
toString
public String toString()
- Overrides:
toString
in class Object
parse
public Date parse(String text)
- Parse the given date with this datespec.
- Parameters:
text
- the String representation of the date.- Returns:
- the Date object parsed, or null if this datespec doesn't parse it.
format
public String format(Date date)
- Given the Date object, format it according to this datespec.
- Parameters:
date
- - Returns:
- the string format of this argument